Is it too much to ask for null safety in the type system?
It's part of Valhalla, as a pre-requirement for heap-flattening.
Ctrl+F for "Null-restricted type". The strawman proposal syntax is "Foo!".
When inlined, a null-restricted class type should have a heap storage footprint and execution time (when fully optimized) comparable to the primitive types. For example, a Point!, given the class declaration above, can be expected to directly occupy 128 bits in fields and array components, and to avoid any allocation in stack computations. A field access simply references the first or second 64 bits. There are no additional pointers.
For a summary of current status and what it means for you as a developer, I recommend the linked email here and the author's comments in the thread:https://www.reddit.com/r/java/comments/13xtog3/valhallas_lat...
https://mail.openjdk.org/pipermail/valhalla-spec-experts/202...
Great read.
TLDR: It is hard to decide what the defaults should looks like, so they plan to add special markers (! and ?) to allow programmers to pass that detail to objects with "undefined nullability" (without ! or ?).