Re:Project Valhalla, Explained: How a Decade of Work Arrives...
by mrkeen on Saturday June 20, 2026 @02:56PM
(#48611888)
This is what your choices are with regard to communicating to the compiler and other developers.
Use a regular class to signal that you may or may not have a value.
Wrap it in an optional to signal that you may or may not have a value.
See the problem?
Types are both for the compiler, as well as for the developer. Maybe types are implicit documentation telling the developer that it is meaningful in the application that this field can have a None state.
That's a huge code smell to ever set null to an Optional/Maybe and code reviews, linters, nullness analyzers all should/will flag such.
Like I have never ever had an NPE from an Optional being null. Sure, complete null safety would be better of course, but in this very instance it ain't buying you much.