2 ms·
No, there’s no inherent need for every variable to allow a nothing. There is a need for a nothing value in many cases and languages without an implicit null, s
by sitharus 8y ago
No, there’s no inherent need for every variable to allow a nothing.
There is a need for a nothing value in many cases and languages without an implicit null, such as Haskell, F# and Rust, employ an ‘option’ type. It’s a dedicated type that either contains a value or nothing. It forces you to declare when you expect a potential null and to check for it.
- deleted 8y ago[deleted]
- doubletgl 8y agoI didn't use the word variable. I think we're talking about the same thing here.