Re:Null References: The Billion Dollar Mistake
by dunefox on Saturday January 11, 2020 @09:18AM
(#22019970)
That's not the same thing as a null pointer because Nothing isn't allowed in place of e.g. integers, strings, etc. like in Java. What you're doing is defining a non-total function. Haskell, per default, doesn't perform exhaustivity checks when pattern matching, but you can enable that via a compiler flag - then it won't let you compile your example. Ocaml, for example, does that by default.
[ Parent
| on HN ]
There are no comments on this comment yet.