3 ms·
I'm pretty sure it boils down to JS can be fast (after all the ASM.js subset of JS is what started WASM), WASM is fast... and also more compact, so smaller file
by simon_void 3y ago
I'm pretty sure it boils down to JS can be fast (after all the ASM.js subset of JS is what started WASM), WASM is fast... and also more compact, so smaller filesizes which means faster downloads. There are probably other advantages as well (like reliable performance, even if you have fast JS, you don't know which code changes code throw you of the hot path and make your JS slower)
- vips7L 3y agoI get that, but it still has no access to the DOM, renders to canvas, and isn’t ADA compliant. It also doesn’t mean that JS or TS can’t compile to WASM either.
- simon_void 3y agocompiling JS to wasm won't make it faster (the things that make it slow are implicitly compiled as well). (typed) TS should be faster, since it provides more guarantees. There is actually a variant of TS which is meant to be compiled to (browser-)wasm: AssemblyScript. And yes, wasm is still closed to being a minimal viable product. But getting adding WasmGC and WASI are big steps (I'm mostly working with Kotlin on the backend, so server-side wasm is more interesting to me then browser-side). Component Model and DOM-support will indeed take some more time.