[Haskell-cafe] Maybe a, The Rationale
stansife at caltech.edu
Sat May 10 21:59:32 EDT 2008
> IME "nullable by default" is one of the biggest
> sources of runtime crashes in high level OOP languages like C#, which is a
> shame because it really isn't that difficult to statically eliminate the
> vast majority of them, especially when you're sort of hand-waving the
> semantics of your language anyway and don't require it to be super
I definitely agree. After I'd been learning Haskell for 6 months and
then wrote a program in Java & C++, almost the first thing I did was
code up a generic Maybe<T> class in each language. It is so much
clearer and more obvious to _explicitly_ have no value
(Maybe.Nothing()) as opposed to _implicitly_ having no value (null).
Now I find my Java & C++ Maybe<T> class indispensable when I am
programming in those languages.
More information about the Haskell-Cafe