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

Yeah, but is the JVM worth it? It seems like VMs are now out of style, after decades of trying to make them performant at the cost of staggering complexity. VMs are still not more performant than native code and with the advent of SaaS, portability isn't a big issue anymore.

I don't think anyone doubts that the JVM is an astounding and amazing piece of tech. But what is in doubt is whether we need such a thing in the first place.

Most new languages (Rust, Nim, Zig, etc) advertise their native code generation prominently. People are tired of the shitty start-up times, inscrutable performance profile, and ginormous memory usage.

Even Oracle realizes this, with the recent push towards GraalVM.

And I say this as someone who would probably choose the JVM, Scala specifically, for any new SaaS project.

I personally haven't really used any desktop JVM app that I was happy with. If Intellij was native, I'm sure it would be 10x better, at least performance-wise.

This industry isn't a monolith, you have Javascript still chugging along, things like Lua as well. Microsft has the CLR as well.

Of course some stuff is conflating the language and the VM (which gets you to things like asm.js) but I think people acknowledge the value of what the JVM provides even in projects you cite (Zig has a whole thing about cross-compilation, for example).

And honestly? targetting a VM is _way easier_ than targetting native code generation. Perf-wise it might suck to try and then engineer good performance out of it (though you can get shared improvements with things like the JVM), but "staggering complexity" feels like a misqualification for something that got us a lot further down the "write once run everywhere" path than C ended up doing.

I would say that writing a rudimentary VM is about as hard as generating LLVM IR. The difference is that the VM will have terrible performance and the LLVM IR will have pretty good performance.

But will it provide introspection, garbage collection, and low-level niceties the JVM provides?

Will I be able to interface with all the huge amount of available java libraries? I could interface with C/C++ but there's already a ffi story (as ugly as it is) with the jvm.

I think part of the appeal of rust and go and new languages is the ability to leave a mark, rewrite or port or rethink an existing library in the new language...

It's a kind of progress but it feels like a lot of waste sometimes. And I say that as an avid Ada developer.

I have also reached a point of wondering whether I care about portability. I like the JVM ecosystem but I generally do not give a damn that the JVM abstracts the underlying OS to me since I have to go install it on the target somehow anyway.

If, tomorrow, I could generate native binaries and still leverage the excellent libraries that I can today, I wouldn't be missing anything at all.

I guess that's the point of Graal VM, right?

Theoretically. It's been reported to have lower total performance than the JVM, and a lot of libraries don't work with it yet. In any case, if GraalVM accomplishes its mission without the amount of handholding it requires today, sure.

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