3 ms·
In my experience the legibility cost is more than outweighed by the fact that Option is only used in a small set of places, rather than implicitly used everywhe
by pcwalton 14y ago
In my experience the legibility cost is more than outweighed by the fact that Option is only used in a small set of places, rather than implicitly used everywhere as with nullable references. Because it's only used in a few places, the use of `.isDefined()` or pattern matching stands out and actually helps to make the reader aware of where computations could fail.
- evincarofautumn 14y agoSure, it’s certainly better to be explicit. I’m just saying that you can have explicit checked optionality and safety and legible code.