News for hackers. Stuff that matters.
Re:Java 26 is here, and with it a solid foundation for the f... by pron on Tuesday March 17, 2026 @08:31PM (#47420258)
And Java has some advantages that are hard to beat. It performs better than Go and builds just as fast (at least when not using some popular build tools) while offering unmatched deep, low-overhead observability.

People might think they may enjoy another language more, but the portion of people who eventually come to regret choosing Java is probably lower than that of any other language.

Re:Java 26 is here, and with it a solid foundation for the f... by Capricorn2481 on Tuesday March 17, 2026 @10:00PM (#47420792)
> and builds just as fast

Source? I'm not saying you're lying but I have never seen any Java project build as fast as Go

Re:Java 26 is here, and with it a solid foundation for the f... by pron on Tuesday March 17, 2026 @10:20PM (#47420911)
Use javac directly, in a recent JDK, to compile lots of files at once (i.e. one invocation of javac to compile multiple files) and you'll see. The speed is over 100,000 lines/sec: https://mill-build.org/blog/1-java-compile.html
Re:Java 26 is here, and with it a solid foundation for the f... by voidfunc on Wednesday March 18, 2026 @12:31AM (#47421606)
Seriously a need for a new build tool in Java that doesn't fuck around too much.
Re:Java 26 is here, and with it a solid foundation for the f... by vips7L on Wednesday March 18, 2026 @01:36AM (#47421910)
Check out mill from the link. It’s quite good.
Re:Java 26 is here, and with it a solid foundation for the f... by voidfunc on Wednesday March 18, 2026 @02:13PM (#47429243)
Oh sweet. Former Java dev turned Go dev like a decade ago, this looks close to what I want.
Re:Java 26 is here, and with it a solid foundation for the f... by nekitamo on Wednesday March 18, 2026 @04:43AM (#47423201)
100% this. Ant was bad in many ways, but at least it was lightning fast. Gradle is just tragic.
Re:Java 26 is here, and with it a solid foundation for the f... by vips7L on Wednesday March 18, 2026 @10:29PM (#47434107)
Re:Java 26 is here, and with it a solid foundation for the f... by HendrikHensen on Wednesday March 18, 2026 @03:21AM (#47422588)
> It performs better than Go

Do you have some sources or experiences to share on this topic? I'm very curious. My experience is the complete opposite.

At my previous job there was a Java web application and running in Kubernetes (1 vCPU and 1Gi of memory) was able to deal with at most 80 requests per second, using up almost the full 1 vCPU and ~600-700MiB of memory. That was a bit disappointing, since we were supposed to support at most ~1000rps on this API, 13+ pods is a lot, and we felt "software could do better".

A reactive guru from another team told us we should use a reactive stack, so he came in and rebuilt the app using the reactive stack. Now it was doing about 120rps on one pod (about the same memory usage), which was a good improvement, but still disappointing.

One guy on the team was motivated to rewrite the API in Go as a proof of concept, and we were blown away. With the same 1 vCPU it was now able to handle 400 requests per second, while using ~100-200MiB of memory, and having approximately 20% better response times.

> builds just as fast (at least when not using some popular build tools)

I find this a little bit of a cop-out, because almost everyone is using the popular build tools. And it's quite a chore to build a full application without those popular build tools. With Go, all batteries for building are included.

Re:Java 26 is here, and with it a solid foundation for the f... by pron on Wednesday March 18, 2026 @03:33AM (#47422676)
From your description it sounds like you're comparing an old Java program running on an old JDK with a new Go program running on a new Go runtime. These days Java has virtual threads (similar to Go's goroutines) and doesn't need a "reactive stack", and its optimising compiler and GCs blow Go out of the water without breaking a sweat.
Re:Java 26 is here, and with it a solid foundation for the f... by HendrikHensen on Wednesday March 18, 2026 @03:47AM (#47422799)
I mean, what is old? How far along are frameworks these days, and what are companies using?

That team was using Java 17. Java 21 was just released and frameworks had no meaningful support for virtual threads whatsoever.

In my experience, most companies using Java are chronically multiple versions behind (e.g. some of my friends still in the Java world are on 11).

Perhaps you can share some sources which prove that Java's performance blows Go out of the water without breaking a sweat? I have not seen any such articles about that in the past 3 years, besides the cherry-picked cases where the JVM JIT can optimize some small algorithmic part of the program on the fly (which is not relevant in most web applications).

I'm happy to stand corrected.

Edit: I found this one using a quick search myself https://medium.com/@mohnisha/java-vs-golang-performance-test... I'll check it out and see if I can reproduce it myself too. Still too bad about that gargantuan memory usage, but I guess memory in the cloud is cheap.

Re:Java 26 is here, and with it a solid foundation for the f... by hocuspocus on Wednesday March 18, 2026 @06:07AM (#47423683)
> Java 21 was just released and frameworks had no meaningful support for virtual threads whatsoever.

Spring was ready on day 1, as virtual threads had been an experimental feature since Java 19. Spring Boot added support within a couple months.

> In my experience, most companies using Java are chronically multiple versions behind (e.g. some of my friends still in the Java world are on 11).

And that's on you.

Re:Java 26 is here, and with it a solid foundation for the f... by Capricorn2481 on Wednesday March 18, 2026 @10:53AM (#47426548)
>> In my experience, most companies using Java are chronically multiple versions behind (e.g. some of my friends still in the Java world are on 11).

> And that's on you

What most companies do is on them?

Re:Java 26 is here, and with it a solid foundation for the f... by HendrikHensen on Wednesday March 18, 2026 @12:05PM (#47427487)
> And that's on you.

Sorry I have to defend my pride here a little bit. When I joined my previous company, the entire company was on Java 8. When I left every app in every team there was up-to-date on the latest LTS release at the time, 17. I assisted many teams in upgrading their Java, Spring, etc, and inspired even more.

I would argue that I'm one of the last people who you could blame for most companies being many Java versions behind...

Re:Java 26 is here, and with it a solid foundation for the f... by hocuspocus on Wednesday March 18, 2026 @07:53PM (#47432874)
So what's the issue then? You'd be able to bring other teams to current versions of Java and frameworks, which have all been using virtual threads for the past 3 years.
Re:Java 26 is here, and with it a solid foundation for the f... by gf000 on Wednesday March 18, 2026 @03:26AM (#47422623)
Well, what frameworks were used? Also what is behind the web requests, what were they doing? Because it's comparing mostly frameworks, not languages.

As for the build tools, unfortunately the scene is not the best on Java - but javac itself is indeed fast.

Re:Java 26 is here, and with it a solid foundation for the f... by HendrikHensen on Wednesday March 18, 2026 @03:49AM (#47422814)
Yeah javac is pretty great. I was doing Kotlin for some time and I was getting very annoying by how much slower and slower running tests and doing full builds became. I thought it was some issue with the JVM ecosystem. Then I started a project with pure Java and I was blown away by how fast it was. Unit tests in my IDE running as fast as I'm used to in Go. And indeed I was surprised by the speed of the compilation step of the build too. Perhaps Kotlin is doing better now, haven't touched it in a few years, but yeah, Java made some great steps there in the past decades.
Re:Java 26 is here, and with it a solid foundation for the f... by Mawr on Thursday March 19, 2026 @12:24PM (#47441950)
> It performs better than Go > and its optimising compiler and GCs blow Go out of the water without breaking a sweat.

Well, dandy! Since the performance gap is that big, it should be trivial to get hard data backing that up. Mind linking some representative benchmarks?

Dang, I just can't wait, same resource usage for Go and Java (RAM in particular, if you would), and Java performance that "blows Go out of the water".

> and builds just as fast

Oh? But you're comparing apples to oranges.

Go builds its source into a machine code executable, all optimizations are applied at this step. This then gets directly executed by the CPU.

Java "builds" its source into bytecode. It's a trivial transformation that then needs to actually be compiled and optimized by a virtual machine at runtime before the CPU can run it.

So then, what build time does Java have when doing AOT compilation? Again, hard numbers please, thanks.

> while offering unmatched deep, low-overhead observability.

> People might think they may enjoy another language more, but the portion of people who eventually come to regret choosing Java is probably lower than that of any other language.

Very believable statements, given that you literally work on Java for Oracle :) No need to bother to make a disclaimer about that I guess. Shameless.

Re:Java 26 is here, and with it a solid foundation for the f... by gf000 on Friday March 20, 2026 @04:04AM (#47451781)
> all optimizations

You might want to take a look at what actually happens here. The only reason Go can compile this fast is that it does barely any optimizations. And yeah, javac also does a literal transfomation to Java byte code, no difference here with Go. One will just get a second chance of actually getting optimized via a JIT compiler.

And Java AOT is not doing the same as Go, so again, apples to oranges. It does a complete closed universe build of the program, which requires knowing what classes are ever reachable, and then running their initializers at build time, so they can be burnt into a binary in an initialized state.

There used to be a GNU java compiler doing pretty much what Go did, it's not hard to build, it just wouldn't be compatible with "normal Java", so the use cases would be limited.