Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Note that you can get null safety in Java today from third-party static analysis tools: https://jspecify.dev/docs/whether/#nullness-checker-support-...

Additionally, the above-linked JEP only proposes to make a small subset of types potentially null-safe. The goal there is performance, not correctness.



I linked the wrong JEP because I was tired. The goal is correctness: https://openjdk.org/jeps/8303099

> Enhance Java's reference types to let programmers express whether null references are expected as values of the type


> It is not a goal (at this time) to apply the language enhancements to the standard libraries

That seems really very limiting and like it would make the feature not very useful in practice.


> (at this time)

It will eventually be a goal. Java does things in steps. First will be introducing the syntax, then another JEP will take care of the standard library. Just like they introduced virtual threads and then introduced structured concurrency. Or like introducing records and then introducing pattern matching over records. Baby steps.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: