2 ms·
That's indeed the biggest problem with null. It can mean many different things, often at once. It can be the third state of any tri-state logic, either absorbin
by lifthrasiir 3y ago
That's indeed the biggest problem with null. It can mean many different things, often at once. It can be the third state of any tri-state logic, either absorbing ("unknown", NaN) or absorbed (`Maybe` monad in Haskell) or something else. Or it can be an object that responds to any message but does do nothing (a "black-hole" object). Or it can be just a placeholder for the actual value to come with no particular operation in mind and will fail on any use. All these properties are implicit when null is being used.
- o11c 3y agoSpecifically, for NaN (and for definitions of NULL that act similarly), it breaks pretty much all useful math due to violating the axiom that `x = x`. All the other weird things it does are totally fine, but an absorbing element still isn't allowed to do that.