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