News for hackers. Stuff that matters.
Re:Java 21 makes me like Java again by wayfinder on Saturday September 16, 2023 @06:37PM (#37539492)
Well when Sun imploded and Oracle stepped in, Java stopped getting regular releases for 10 years. Java versions literally came out every 2 years before Oracle happened.

So that’s why they’re 10 years behind. But now they come out like 2+ times a year so they’re on track making major progress.

Also the null thing hasn’t been an issue for over 10 years. Just use null annotations and both your static checker and your IDE will catch every NPE.

Re:Java 21 makes me like Java again by bedobi on Saturday September 16, 2023 @08:16PM (#37540201)
> Also the null thing hasn’t been an issue for over 10 years.

I don't think I've ever seen a Java codebase that doesn't experience NPEs in prod, and that includes modern greenfield ones that make use of all the tools to combat it.

> Just use null annotations and both your static checker and your IDE will catch every NPE.

Yeah, or just catch it in code review, or just xyz...

Or, just switch to a compiler that doesn't allow it in the first place, out of the box?

Re:Java 21 makes me like Java again by kaba0 on Sunday September 17, 2023 @06:08AM (#37543378)
> I don't think I've ever seen a Java codebase that doesn't experience NPEs in prod

Frankly, the last NPE I saw in production was many many years ago.

Re:Java 21 makes me like Java again by bedobi on Sunday September 17, 2023 @05:31PM (#37549548)
same, Kotlin doesn't compile if you try to deference null pointers
Re:Java 21 makes me like Java again by cmrdporcupine on Saturday September 16, 2023 @10:08PM (#37540788)
TBH, Sun was already excessively conservative with language features in Java long before the Oracle purchase.

The JVM runtime though is and was a miracle of engineering. Enough to make the mediocrity of the language worth it. Though these days I don't (and don't want to) work in it, I absolutely understand why companies could make the choice to do so.