> Ridiculous performance, near-instant startup, radically less memory consumption.
It seems like your use case is rather not a good fit for Java.
Java shines best with large applications, where more abstract source code is desired and when you care more about typical performance, not the worst case performance. And if you can afford the cost of all those benefits, which is higher RAM usage.
Think about most software running SaaS's - you don't think they would appreciate "Ridiculous performance, near-instant startup, radically less memory consumption"? Especially if there's not really a downside?
I mean, I've been writing JVM based software for 27 years now, but it was written for a different world (that never came), and it just isn't a perfect fit for most of our needs any more.
It's not like typical performance of Java is great and only GC pauses (or whatever) drag it down. In other words, Java is no match for Rust / C / C++ even comparing "good runs only" of both.
There are no GC pauses in modern Java implementations, and there are plenty of systems written in C and C++ that have been replaced by Java, I took part in such projects.
Companies like PTC and Aicas stay in business, because there are plenty of industries that pay for their embedded JVM implementations instead of keeping legacy C and C++ infrastructure running.
I'm arguing against "Java performance is as good as it gets" in this thread, but the best Java GCs have sub-millisecond pause times for huge heap sizes and, apparently, such a GC even became the default recent-ish-ly: https://inside.java/2023/11/28/gen-zgc-explainer/
The JVM is amazing technology for what it is, but what it is still limits how fast it can go.
We are really talking about different categories of software. The C++ / Rust world typically operates at a different one than where Java does. It used to be manual memory management was a burden that the biz wasn't willing to invest in for typical software - with LLMs, the trade-off landscape has changed (sounds like buzzword BS, but it's true).
When you can get the benefits and let the LLMs pay for the downsides you'd otherwise have to handle - that's a change of circumstances that we really ought to pay attention to as software devs.
Can you write very fast Java software, yes - LMAX is a great example. Can you write slow Rust/C++ code, absolutely. But the values, community and tech built around the latter really does make it a lot easier when that's your (and your LLM's) goal.
> Deployment of Java applications continues to be a mess
If it could help you, we're using JIB. We're on Scala and so we're using sbt-jib. Zero issues, works like a charm, deployment (on k8s) is just not a problem for us. But I would expect that it should work well for Java too.
On a related note.. The JDK developers could learn a thing or two from Scala, which comes with the really handy scala-cli. The JDK should have something similar.
Kotlin has always had smart-casting in if and when (sort of switch) expressions, which are strictly more powerful than the current version of Java "pattern matching". Both don't do de-structuring which I would consider a basic requirement for pattern matching, but at least Kotlin didn't call it pattern matching.
But what example would you have to demonstrate it's more powerful? As a matter of fact, Kotlin smart-cast approach can't tolerate mutability because it can't guarantee safety, yet Java guarantees.
reply