4 ms·
No. The problem is conflating "logical null" (the absence of data) with "technical null" (a pointer to nothing). Logical null is often essential for expressing
by nerdponx 7y ago
No. The problem is conflating "logical null" (the absence of data) with "technical null" (a pointer to nothing).
Logical null is often essential for expressing business logic in code. Technical null is (as far as I can tell) a C implementation detail that probably never should exist in a higher-level language.
The Haskell equivalent of logical null is Nothing. There is no technical null because there is no need to represent that one specific implementation detail in Haskell.
As for using NaN to represent logical null instead of a special reserved value, that has a lot of ergonomic problems. Anyone who has used Python for data analysis can attest.