[Haskell-cafe] Maybe a, The Rationale
PR Stanley
prstanley at ntlworld.com
Tue May 13 17:35:16 EDT 2008
> Paul: What is the underlying rationale for the Maybe data type?
>
>It is the equivalent of a database field that can be NULL.
Paul: shock, horror! the null value or the absence of any
value denoted by null is not really in harmony with the relational model.
> > is it the safe style of programming it encourages/
>
>Yes. Consider C, where this is typically done with a NULL pointer, or
>Lisp, where you use the empty list, nil. These are perfectly good
>values in themselves, while Nothing is just Nothing, if you pardon the
>pun.
>
>-k
>--
>If I haven't seen further, it is by standing in the footprints of giants
More information about the Haskell-Cafe
mailing list