WASM just skips the JS to JIT compiled bytecode - correct me if I’m wrong. Creating a standardized bytecode for distribution that other languages can compile to.
No reason to continue to shackle the web to JavaScript.
WASM just skips the JS to JIT compiled bytecode - correct me if I’m wrong. Creating a standardized bytecode for distribution that other languages can compile to.
No reason to continue to shackle the web to JavaScript.
https://hacks.mozilla.org/2018/10/webassemblys-post-mvp-futu...
Another reason is JS already has many high level features. Which might make it easier to implement similar ones in your language if you target JS directly.
The last reason I can think of is interop with existing JS code and the DOM.
Better WASM/JS interop is on the way, though atleast on Firefox nightly you can get this for fairly low cost for some functions.
GC is also on the todo list and IIRC might get an early preview in Firefox Nightly.
Once the GC is done, DOM integration will happen, people are eager for that and that would eliminate a lot of the necessary JS glue code.