6 ms·
Can't this be handled by the language itself, by default? Of course; most sane languages require an explicit annotation to say that an object can be null. If
by jrockway 17y ago
Can't this be handled by the language itself, by default?
Of course; most sane languages require an explicit annotation to say that an object can be null. If it's not that type, there is simply no way to create an object that is null.
(Haskell is an example of a langauge like this; no objects can be null. Maybe and Either build on top of this system to provide a well-defined approximation of null.)