3 ms·
Note that you can get null safety in Java today from third-party static analysis tools: https://jspecify.dev/docs/whether/#nullness-checker-support-for-jspecify
by ameliaquining 1y ago
Note that you can get null safety in Java today from third-party static analysis tools: https://jspecify.dev/docs/whether/#nullness-checker-support-for-jspecify 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.
- vips7L 1y agoI linked the wrong JEP because I was tired. The goal is correctness: https://openjdk.org/jeps/8303099 https://openjdk.org/jeps/8303099 > Enhance Java's reference types to let programmers express whether null references are expected as values of the type
- ameliaquining 1y ago> 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.
- vips7L 1y ago> (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.