The JVM isn't really all that flexible of a runtime. The JIT is tuned for Java, the GC is tuned for Java, the instruction set was designed for implementing Java. All the other languages/recompilers had to be built around these limitations, and additionally had to be designed for Java interop to have any chance at success. Arguably only Scala, Kotlin, Clojure and Groovy* have had any real success, in my opinion mainly because they sought to improve on Java rather than try to crowbar an existing language into the JVM.
WASM, as far as I can tell, was designed as a virtual machine and flexible compilation target first and foremost, and it's building on old experiments like NaCl and asm.js, both of which had to compile to Javascript and so are rather similar to the situation with the JVM.
It also has an LLVM backend which means almost any language with an LLVM frontend can already compile to WASM. The alternative languages to Java all had to write their own compilers from scratch (though I'm sure they reused some stuff from OpenJDK).
The ABI for interop is also a lot simpler than on the JVM. It doesn't require knowledge of objects or interfaces or anything, just functions (which almost every language has in some form or another).
The JVM isn't really all that flexible of a runtime.
There is also CIL/CLR. I guess it started as the JVM for C#, but pretty soon they wanted to support other languages with it. The mono implementation can be embedded on the common platforms.
Except I can't think of any new language being developed primarily for the CLI/CLR that isn't published by Microsoft. According to Wikipedia there's been a number of attempts, but most of them look to have stagnated or been abandoned.
I think it'll help a lot that Webassembly started with a simpler runtime model (flat memory) and went from there. Also that it's an open standard, and is much better integrated with the Web.
Cool stuff. Webassembly will change the software industry as we know it. Reuse software between languages and platforms like never before .
bluejekyll 26 points · Jan 2019 · hickory-dns · trust-dns
Maybe. It’s worth noting that many people saw the JVM in the same way: Java, JRuby, Scala, Kotlin, Clojure, etc.
Right now WASM looks like it’s in a better position because it’s more open, but I think it’s worth pondering why the JVM isn’t already this.
DroidLogician 15 points · Jan 2019 · sqlx · clickhouse-rs · mime_guess · rust
The JVM isn't really all that flexible of a runtime. The JIT is tuned for Java, the GC is tuned for Java, the instruction set was designed for implementing Java. All the other languages/recompilers had to be built around these limitations, and additionally had to be designed for Java interop to have any chance at success. Arguably only Scala, Kotlin, Clojure and Groovy* have had any real success, in my opinion mainly because they sought to improve on Java rather than try to crowbar an existing language into the JVM.
WASM, as far as I can tell, was designed as a virtual machine and flexible compilation target first and foremost, and it's building on old experiments like NaCl and asm.js, both of which had to compile to Javascript and so are rather similar to the situation with the JVM.
It also has an LLVM backend which means almost any language with an LLVM frontend can already compile to WASM. The alternative languages to Java all had to write their own compilers from scratch (though I'm sure they reused some stuff from OpenJDK).
The ABI for interop is also a lot simpler than on the JVM. It doesn't require knowledge of objects or interfaces or anything, just functions (which almost every language has in some form or another).
[deleted] 4 points · Jan 2019
There is also CIL/CLR. I guess it started as the JVM for C#, but pretty soon they wanted to support other languages with it. The mono implementation can be embedded on the common platforms.
DroidLogician 2 points · Jan 2019 · sqlx · clickhouse-rs · mime_guess · rust
Except I can't think of any new language being developed primarily for the CLI/CLR that isn't published by Microsoft. According to Wikipedia there's been a number of attempts, but most of them look to have stagnated or been abandoned.
[deleted] 1 points · Jan 2019
There are plenty of old languages that target it though. I believe there are more targeting it compared to wasm.
[deleted] 1 points · Jan 2019
[deleted]
DroidLogician 1 points · Jan 2019 · sqlx · clickhouse-rs · mime_guess · rust
Forgot about that one, though the only high-profile use I can think of is Gradle.
fioralbe 10 points · Jan 2019
Well there is a very big difference, nobody planned to compile C to the JVM
rebootyourbrainstem 3 points · Jan 2019
I think it'll help a lot that Webassembly started with a simpler runtime model (flat memory) and went from there. Also that it's an open standard, and is much better integrated with the Web.
pure_x01 3 points · Jan 2019
I think the openess is key here. Wasm is also backed by many bug companies. There was a totally different climate when the jvm entered the world.