3 ms·
Automatic TCO affects stack traces, which programs might rely on at runtime, requiring that browsers agree on what the right behavior should be; on the flip sid
by bcherny 6y ago
Automatic TCO affects stack traces, which programs might rely on at runtime, requiring that browsers agree on what the right behavior should be; on the flip side, manual TCO (with annotations) would need to be a language feature.
- EE84M3i 6y agoThis is the correct answer per the linked article. In particular this is runtime inspectable via func.caller so it really is a behavioral language change to allow the elision of stack frames.
- DarkWiiPlayer 6y ago> Automatic TCO affects stack traces, which programs might rely on at runtime, requiring that browsers agree on what the right behavior should be; Browsers don't have a say in this. They're making the decision to not be compliant with the specification, so they effectively don't support ES6.
- pygy_ 6y agoSafari supports proper tail calls per the ES6 spec. If your code relies on the non-elimination of tail calls it will not work in Safari, and thus not be Web compatible.
- zelphirkalt 6y agoOne could argue, that writing programs, which rely on the stack trace is a bad practice. Handling of exceptions should take care of unexpected situations. I don't know of any scenario, where a program needs its own stack trace, which could not be solved by making use of exception handling properly. Perhaps anyone can give an example?