Hacker News new | past | comments | ask | show | jobs | submit login

> I think WASM has the ability for us to finally cross the language boundaries without marrying ourselves to C/C++ ABI

Uhhhhh. This sounds like a kind of silly thing to say, when you just described the jvm. Except for the part where there is a common stdlib.




If only the JVM had included unsigned math.


Legend goes Gosling did not found anyone at his department that could answer all his questions about unsigned arithmetic, hence why he left it out from Java's initial design.

However since Java 8, the java.lang numeric classes do support unsigned arithmetic.

Yes it is a bummer that byte is signed, requiring extra math to simulate unsigned.


Yup, I use those unsigned methods, e.g. https://github.com/cretz/asmble/blob/3cb439e887245f23bf876e8.... Luckily WASM only has 32/64 bit integer arithmetic.


there is... 'char'; char is an unsigned 16bit primitive (of course, adding 2 chars results into an int and you need a cast but that's another story)


> Except for the part where there is a common stdlib.

Yeah, and it's huge and interconnected (just see how much they had to do to get a java.base module and how large that still is). And the JVM has lots of specifics around threading, GC, OOP, classes, security model, etc. And many of those specifics don't translate to the needed safe-by-default, minimal-by-default bytecode for the web and other targets.

I could really go on for a long time about why applets failed and why JVM bytecode and the JVM runtime are terrible for the web (and any generic bytecode that doesn't target the web can't really be that generic). What is silly is ignoring all of this. Think about why there are already C++-to-WASM compilers after such a short time and no reasonably-usable and maintained C++-to-JVM compilers.


Whoever said JVM should be for the web? The question was, why don't we have a way to cross language boundaries and the answer was: we do, the jvm.


I would have had a great answer: Normally I count upwards from 0.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: