top | item 36126685

(no title)

inadequatespace | 2 years ago

> not much momentum

Scala? Kotlin?

To be fair these came into play WAY after the JVM

discuss

order

ecnahc515|2 years ago

Those languages are very much designed around the JVM though. You have Scala, but not eg: C++, because the JVM itself is much higher level than what many languages would want to target.

duped|2 years ago

Arguably, JVM languages have much better tooling for them to be designed and interoperable (through Truffle and GraalVM) than WASM where everyone has to write a backend (or use LLVM which has its downsides).

throwaway894345|2 years ago

These are all languages that were designed expressly to run on the JVM, whereas WASM aspires to support existing languages. I'm not familiar with JVM bytecode (and would love to hear from someone who is), but I'm guessing the JVM bytecode offers less in the way of low-level control over memory allocations and so on which would be required to compile C, C++, Rust, Go, etc programs with reasonable performance characteristics?

brabel|2 years ago

JVM bytecode assumes the GC allocates and frees memory, so no, you don't have direct access to memory... though the Java standard library does let you allocate bytes and manage those yourself[1], not sure if you would consider that "more control over memory allocations".

JVM bytecode is quite approachable: https://en.wikipedia.org/wiki/List_of_Java_bytecode_instruct...

And does look superficially similar to WASM instructions. When WASM gets GC, I have trouble seeing what's fundamentally different between the two, to be honest... even something like (parts of) the Java stdlib will be available to WASM with the WASI API, making the difference too small to distinguish them into different categories IMO.

[1] https://blogs.oracle.com/javamagazine/post/creating-a-java-o...

pjmlp|2 years ago

CLR was designed for C++ as well. About 20 languages supported on release day.

IBM TIMI was designed for C and C++.

Amsterdam Compilers Toolkit was designed for Pascal, Modula-2 and C.

Nothing new really.