3 ms·
Transpiling some dynamic languages to JS is still sensible. WebAssembly is initially for static languages, and eventually (with JIT and GC support) it'll be usa
by jfbastien 11y ago
Transpiling some dynamic languages to JS is still sensible. WebAssembly is initially for static languages, and eventually (with JIT and GC support) it'll be usable as a building block to host dynamic language VMs.
- BinaryIdiot 11y ago> Transpiling some dynamic languages to JS is still sensible. It's still practical, today, should you want to use something other than JS but I don't think it's that sensible. You take one language's syntax and idiosyncrasies, convert it to another language with its own, sometimes differing, idiosyncrasies and now you have to debug it, sometimes in a different language than it was written it. I don't mind TypeScript or any of the others but I think WebAssembly is what makes those language great; transpiling to JavaScript is a hack. Just imagine ECMAScript 7 then ECMAScript 8 support coming in very quickly after announcement because your JavaScript now compiles to WebAssembly. You won't have to wait or deal with browsers that are lacking the necessary APIs; it'll "just work" because it's all compiled to WebAssembly.
- ZenoArrow 11y agoThat's not what jfbastien is saying. The point is, until the time when WebAssembly has a GC and a JIT, many dynamic languages simply won't be able to target WebAssembly (unless the dynamic language developers create their own bespoke JIT/GC), so you may as well stick to targeting JS. At the point at which WebAssembly gets a JIT and GC, then the situation changes.
- BinaryIdiot 11y agoYup I know; I never said anything to the contrary just talking up WebAssembly's advantages. This release is a very early and somewhat rough version.