30 ms·
I am (somewhat) familiar with the JVM. Yes, it's also a stack based VM that is relatively small, at least superficially. It's really not that simple though. T
by the_duke 5y ago
I am (somewhat) familiar with the JVM.
Yes, it's also a stack based VM that is relatively small, at least superficially.
It's really not that simple though. Things like GC, exception handling, a whole class model with constructors and methods, ... All of that brings countless implicit requirements that are only passingly mentioned in the spec. Plus the whole host of complexity needed in practice for supporting the Java Platform.
Core Webassembly has nothing of that.
But to be fair: Webassembly is also growing more and more complex (SIMD, reference types, GC, interface types, module linking, tail calls, exceptions, ...)
Can the JVM be what Webassembly is? Or the CLR, for that matter? Technically: of course.
My point was really more about the ecosystem as a whole. JVMs were never really intended as a general purpose, multi/cross language ecosystem of generic computation. And everything around it is noticeable. In the build tooling, in the libraries, in the development process and focus, the lack of AOT until recently (in open source implementations), ....
Sure, that's changing now with GraalVM and a focus on cross language support. There are some extremely cool things happening there.
I'd still much rather bet on an ecosystem based on an open standard with lots of interest from different parties.
In fact, GraalVM already supports Webassembly, including WASI! So in certain sense Wasm is already more general.
- kaba0 5y ago> the lack of AOT until recently (in open source implementations) The gcc project had a now discontinued AOT java compiler 2 decades ago. Java is as open as it gets, with a standard, that can be changed through a community process. I feel the web is much less open with behemoths having basically infinite veto powers like google apple microsoft. > In fact, GraalVM already supports Webassembly, including WASI! So in certain sense Wasm is already more general. And teavm can run java byte code both in js as well as wasm :D
- the_duke 5y ago> The gcc project had a now discontinued AOT java compiler 2 decades ago. Was that ever really production ready?
- pjmlp 5y agoYes, Red-Hat used to AOT compile Eclipse with it.
- the_duke 5y ago> Java is as open as it gets, with a standard, that can be changed through a community process. Isn't the JCP also controlled by a hand full of corporations? Seems pretty much the same to me. > And teavm can run java byte code both in js as well as wasm Hah! I didn't know TeaVM had a WASM target, that's actually great to know.