3 ms·
Right, but the difference in reality is that developers don't check every reference to see if it's null. The difference between a raw reference and optional is
by AlisdairO 11y ago
Right, but the difference in reality is that developers don't check every reference to see if it's null. The difference between a raw reference and optional is that with optional the author of the interface has explicitly signalled 'you really ought to check this'. Optional provides the ability to work with better conventions.
Sure, this doesn't live up to the actual guarantees provided by other languages, but that's not the same as being useless.