Status of: Null-Restricted and Nullable Types (Preview)

Archie Cobbs archie.cobbs at gmail.com
Tue Feb 18 19:35:24 UTC 2025


Question about JDK-8303099 <https://bugs.openjdk.org/browse/JDK-8303099> -
"Null-Restricted and Nullable Types (Preview)".

This idea really clicks for me. The need to prove that some variable is not
null is utterly pervasive, so the addition of a single "!" character that
proves it would be a huge win. It would be yet another "help me prove this
code is correct" task I can offload to the compiler, adding it to a long
list that includes final fields, unchecked warnings, exhaustive switch,
sealed types, etc.

What is the current status of this JEP?

   - Is there some general consensus on the idea?
   - Has anyone started work on a prototype?
   - Does it really depend on valhalla, or could it stand by itself?

Thanks,
-Archie

-- 
Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/valhalla-dev/attachments/20250218/e68012a8/attachment.htm>


More information about the valhalla-dev mailing list