by smabie · 6y ago · 0 comments
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.
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.
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.
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.