5 ms·
> maybe one day we'll have browsers that come with several languages' runtimes baked in asm.js/WebAssembly takes care of that.
by eeZi 11y ago
> maybe one day we'll have browsers that come with several languages' runtimes baked in
asm.js/WebAssembly takes care of that.
- skybrian 11y agoI don't see how it does. You'll still have to download the language runtime (including a garbage collector for a language like Python). Perhaps it can be cached, but that's a heavy requirement for a web page, particularly on mobile. By contrast, a language that compiles to regular JavaScript can use the GC built into JavaScript.
- DiThi 11y agoIf I understood correctly, WebAssembly, unlike current asm.js, will be able to allocate and use GC objects.
- rictic 11y agoNote: a future version of WebAssembly may be able to use the browser GC.
- DiThi 11y agoYes, that's what I meant.
- bobajeff 11y agoWebAssembly is pretty much going to be mapped to Asm.js initially. Most of the features it's getting that asm.js doesn't have yet are future asm.js features which wasm is also to be mapped too. This includes things like pthreads, SIMD and the ability to support GC languages.