2 ms·
Javascript has GC and tail calls, and I don't think WASM is getting either anytime soon.
by tadfisher 4y ago
Javascript has GC and tail calls, and I don't think WASM is getting either anytime soon.
- jillesvangurp 4y agoThe experimental Kotlin WASM uses some experimental GC related flags in chrome. That stuff is working right now and will no doubt stop being experimental at some point. Tail calls might take a bit longer but there are probably people working on that too. But there are probably ways around that. WASM is already useful today and will incrementally get more useful over the next few years.
- johnfarrelldev 4y agoI'm not sure about other engines but V8 the most popular JS engine does not implement tail calls.
- dragonwriter 4y agoIsn't not efficiently implementing tail calls a current JS standard (in that implementing them means your implementation is technically broken) specifically to prevent software from relying on that optimization?
- tadfisher 4y agoSomeone should tell Ecma then: https://tc39.es/ecma262/multipage/ecmascript-language-functions-and-classes.html#sec-tail-position-calls https://tc39.es/ecma262/multipage/ecmascript-language-functi... I was wrong, though, tail calls are in ES14, and eliminating them is probably not implemented anywhere yet. Edit: Wrong again, tail-call optimizations are in WebKit; iOS has had them since iOS 12 according to this: https://kangax.github.io/compat-table/es6/#test-proper_tail_calls_(tail_call_optimisation) https://kangax.github.io/compat-table/es6/#test-proper_tail_...