
21 Sep
2005
21 Sep
'05
6:51 a.m.
Bill Wood
The variable mem is a so-called hybrid variable; it crunches together 2 different concepts: a boolean value (could I allocate memory?) and an address value (what is the address where I can find my allocated memory).
IMO, Maybe is exactly the oppsite, it extends a data type with a NULL value (to use DB terminology), and leaves no opportunity for confusing the extended type with the original.
I mostly agree with the "tightening-up", but there are times when I really miss the nil hacks :-)
In Haskell as well? I alwasy felt the cost of inserting a "null" predicate (when I want to test for an empty list) to be low. -k -- If I haven't seen further, it is by standing in the footprints of giants