Hacker News new | ask | show | jobs
by yami 2665 days ago
Amazing! It's like we could write once and run everywaaaait a moment...
3 comments

Tech is rarely about tech (same as for most things in life: X is rarely about X). It's about money and power/control.

Java was proprietary for a long time and even now it's basically controlled by Oracle.

Also, due to various issues, it doesn't really run on Android and it doesn't run at all on iOS (I know about Codename One, I mean the OpenJDK).

WASM is a truly open standard. And it's quite likely to be present on all platforms, even though for obvious reasons platform vendors will drag their feet regarding WASM.

>WASM is a truly open standard

I guess in practice this means "open" like HTTP and HTML, for which Google decides what does/doesn't go into the standard.

WASM has been developed mostly outside of google (mozilla mainly) and is actually counter to a lot of the attempts google made to get similar features (e.g. NaCl). It's quite hard to claim google has had undue influence on its development.
precisely what I was thinking...they have their hands in all these standards and most times seem to push the direction. But I will say this.. I'd rather them work on these "open" standards, then go ahead and keep to their own.. so i guess gotta take some bad with the good
But now you can choose your own programming language. The JVM is very Java centric, for obvious reasons.
Obviously its purpose was to support Java, but a number of languages - most prominently Scala, Kotlin, Clojure, Groovy and Ruby - run on the JVM. With perhaps the exception of Kotlin, these are not especially Java-like.

There is an interesting degree of independence. A lot of Java semantics is not baked into the JVM, and in the case of invokedynamic there was for a time a significant JVM feature that java didn't use.

The JVM is a pretty decent target for languages with garbage collection, objects (of some form), and methods / functions. Those facilities are useful for most languages these days, and provide a large degree of interoperability. I don't have to really thing about ruby calling java and back again, no calling conventions or issues with garbage.

It will be interesting to see whether WASM will support those kinds of features.

Names matter, though. For as long as the JVM has been called the "JVM" it has been associated with the Java language.

Using the Java language on other VMs confuses people in exactly the same way that using the Java Virtual Machine for other languages confuses people.

The outcome might have been different had they called it something like HLVM instead of JVM.

Taking this further, wouldn't this imply that WebAssembly is only for the Web?
JVM is too high-level, is the problem. You're still tied to its memory model, its object model, its type system etc.

It's much better to build this in layers - a standardized lowest layer that's something like WASM, then a standardized object model on top of that etc. That way, you can have a single stack supporting a broad variety of languages, with degree of interop compatibility dictated by how much in common they have.

You mean, like with TruffleRuby and JRuby, and TrufflePython and Jython, which both already run faster on the JVM than their "native" implementations of Ruby and Python do otherwise?
Just like the CLR and LLVM.
I've never been very fond of CLR outside of Windows platforms.

As for LLVM, sandboxing has never been a core feature (AFAIK).

It was called PNaCl.

WebAssembly only exists because Mozilla went with asm.js instead.

yeah but Windows support is highly experimental - hmm, wonder why.