One unfortunate thing about $err:stack-trace is that it is difficult to serialize, for example as json: serialize($err:map, { 'method': 'json' }) does not work anymore.
I think we should not focus on optimization concerns, but rather return a plain string. If an implementation wants to optimize it further, it shouldn’t be that hard to internally represent it as a lazy string that is generated only when requested.
One unfortunate thing about
$err:stack-trace
is that it is difficult to serialize, for example as json:serialize($err:map, { 'method': 'json' })
does not work anymore.I think we should not focus on optimization concerns, but rather return a plain string. If an implementation wants to optimize it further, it shouldn’t be that hard to internally represent it as a lazy string that is generated only when requested.