|
|
|
|
|
by Veedrac
2412 days ago
|
|
You'd lose a lot and I'm not sure what you gain. Sans a few niggles here and there, WASM is pretty great for the web. It's small, lightweight, sandboxed, verifiable, fast to JIT, has fallbacks to ASM.js/stock JS, mostly easy to compile to, simple to build tooling for, etc. |
|
JVMs are sandboxed and verifiable too, not sure what use a fallback to stock JS is but you can run a JVM in JS (look at TeaVM), it's way easier to emit bytecode for almost any modern language than WASM simply because JVMs do garbage collection for you and it's not really any easier to build tooling for WASM than any other VM.
In the end the main reason to do WASM over other VMs is that this way Mozilla/Chrome guys get to own it, instead of a competing firm.