Live data from Hacker News

Java 26 is here

hanno.codes

281–290 of 352 posts

Re: Java 26 is here

#281

Earlier quoted context omitted.

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 Ja…

> 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.

> 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

#282
post #37

the people that work on Java & the JVM are very smart. it has become a best of breed language - hell its better than Go for industry purposes. the drawback with Java will always be the CULTURE - (maybe someone can insert a quote of how in physics progress is only made, when old physicist die - I don't wanna be morbid ) but with Java same that's when the culture will change. All those people using typescript (could be…

The drawback is also the JVM. Its a heavy, bulky VM. The alternative being Go that is much lighter.

Re: Java 26 is here

#283
post #71

Earlier quoted context omitted.

Once i heard a manager explain "we must get rid of anything Oracle, including Java, because of license reasons". I see this attitude everywhere since. JavaScript people are too afraid to use Java, that is why something like TypeScript exists. And for personal projects, C# has become a better and more fun "just works" platform.

I mean, sometimes managers are uninformed and say stupid things? You can use any of the other jdk builds from the plethora of other vendors and have zero interaction with Oracle. I absolutely hate Oracle as a company, but they've really done a good job with Java stewardship. They actually open sourced the entire language / jdk and a lot of the tooling that used to be proprietary. They still love to play the old Oracl…

You don't have to tell all this to me, or try to convince me. I was just describing what the general attitude is. Oracle's behaviour is a risk, even if Java is open source.

Re: Java 26 is here

#284
post #37

the people that work on Java & the JVM are very smart. it has become a best of breed language - hell its better than Go for industry purposes. the drawback with Java will always be the CULTURE - (maybe someone can insert a quote of how in physics progress is only made, when old physicist die - I don't wanna be morbid ) but with Java same that's when the culture will change. All those people using typescript (could be…

I dont think the Spring ecosystem is bad. In fact, its one of the more stable frameworks. Even spring AI which is built for AI agents a new use-case is very intuitive if you take time to learn its abstractions. Usually doesnt take more than a day of reading docs and writing some try-out code. The thing I really like about Java is the stability of its packaging ecosystem. Maven is XML (yuck) but is okay with the IDE integrations. Gradle has advanced features often missing in Python / Go such as build caching. The OOP stuff is also good because it scales with very large code bases. In, fact frontend esp React adopted a functional style which leads to complexities associated with hooks. A mixed approach is usually better. Overall, the only bad thing are the multiple unnecessary abstraction layers which are a pain in any language. Rest of Java is quite good.

Re: Java 26 is here

#285
post #110
post #37

the people that work on Java & the JVM are very smart. it has become a best of breed language - hell its better than Go for industry purposes. the drawback with Java will always be the CULTURE - (maybe someone can insert a quote of how in physics progress is only made, when old physicist die - I don't wanna be morbid ) but with Java same that's when the culture will change. All those people using typescript (could be…

I wonder if at we are standing looking at the smoking field of programming languages created over the last 50 years and gazing at the final survivors, of which Java is definitely one. Why would anyone create a new language now? The existing ones are "good enough", and without a body of examples for LLMs to train on, a new language has little chance getting traction. I learned IBM /360 assembler when I started in comp…

> Why would anyone create a new language now?

Same reason you'd ever create a new language — to start anew, breaking free from the shackles of backwards compatibility of the old language, having learned the lessons of the past.

The AI angle makes even less sense — surely we will want to create languages that are tailored for them.

Re: Java 26 is here

#286
post #212

Earlier quoted context omitted.

How is Go not high level? What makes it "systems" language? That's just marketing. It is a language with a fat runtime, running a garbage collector. You just burn it into the binary and call it a day.

(just like modern Java can burn its runtime / GC into the binary)

No, not just like. You're downplaying significant differences between the two that do in fact matter. So much so in fact, that you're just wrong. Stop spreading misinformation.

Re: Java 26 is here

#287
post #183

Earlier quoted context omitted.

Seriously a need for a new build tool in Java that doesn't fuck around too much.

Check out mill from the link. It’s quite good.

Oh sweet. Former Java dev turned Go dev like a decade ago, this looks close to what I want.

Re: Java 26 is here

#288
post #74

Earlier quoted context omitted.

Ya, that seems to be a misunderstanding. "Industry purposes" covers a huge range of stuff. Go is pretty good for systems programming where Java isn't really an option due to the fundamental limits imposed by garbage collection and lack of pointers. Java is pretty good for higher-level application development where occasional GC pauses are tolerable (the GC pauses are rare and fast now, but they still rule out using J…

Are you sure about Go's garbage collector doesn't have pauses? AFAIK they are worse than modern Java's garbage collector [1]. I'm not sure it's even better than Java's, especially for modern ZGC (and you can choose your GC in Java). Definitely less configurable. I would say most of online comments about Java's GC are long outdated. For example, in web servers a lot of work is request-response, so it's convenient to u…

> I would say most of online comments about Java's GC are long outdated.

They are not. Feel free to look up literally any half-decent benchmarks. If Java's on par or better than any other language of note, check the memory usage. It's standard for Java to have 5-20x the memory usage for about the same performance. The memory floor also seems to be in the hundreds of megabytes. Ridiculous.

> For example, in web servers a lot of work is request-response, so it's convenient to utilize generational GCs (so that each request data would fit into "young" generation).

No, that's a job for arenas. Generational GCs are mostly a result of Java's limitations, and not a univerally good approach.

> Go's GC is not generational though, so you should care about allocations.

You should always care about allocations. In fact, the idea that you shouldn't is a big part of Java's poor performance and design.

Re: Java 26 is here

#289
post #213

Earlier quoted context omitted.

Are you sure about Go's garbage collector doesn't have pauses? AFAIK they are worse than modern Java's garbage collector [1]. I'm not sure it's even better than Java's, especially for modern ZGC (and you can choose your GC in Java). Definitely less configurable. I would say most of online comments about Java's GC are long outdated. For example, in web servers a lot of work is request-response, so it's convenient to u…

Java's GCs (plural) are hands down better.

Ok, which one do I choose then, with what configuration? How much time do I need to spend on this research?

How do I verify that they are actually better? Is the overall performance of my program better? Because that's what I care about. I of course do include memory usage in "performance".

Re: Java 26 is here

#290

Earlier quoted context omitted.

A lot of the answer is that if you can do more work while generating less garbage (lower allocation rate) this problem basically solves itself. Basically every "high performance GC language" other than Java allows for "value type"/"struct"s which allow for way lower allocation rate, which puts a lot less pressure on the GC.

And yet Java outruns pretty much all of them, because it doesn't actually allocate everything on the heap all of the time. And you've been able to declare and work with larger structures in raw memory for ... 20 years? You mostly don't need to, but sometimes you want to win benchmark wars. And of course it's getting value types now, so it'll win there too. As well as vectors.

Post benchmarks. No, ones where you use 20x the memory of Rust to do the same job 1% faster don't count.
Post reply on HN