5 ms·
What do you call "proper recursion support"? I assume it's tail-call optimisation, but I don't think it's a property of Javascript-the-language, but rather a pr
by williamdclt 2y ago
What do you call "proper recursion support"? I assume it's tail-call optimisation, but I don't think it's a property of Javascript-the-language, but rather a property of the interpreter/compiler? I don't think there's anything inherent to javascript that would prevent V8 to have TCO (and I think it did use to have it) for example.
And in fact I _think_ some engines do have TCO (bun? javascriptcore?), but I could be wrong
- Jtsummers 2y agoES6 added this: https://262.ecma-international.org/6.0/#sec-tail-position-calls https://262.ecma-international.org/6.0/#sec-tail-position-ca... So TCO is part of the language standard but not universally implemented. You are correct about the ones that support it.