News for hackers. Stuff that matters.
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