News for hackers. Stuff that matters.
Re:Brilliance of Haskell's Maybe type and the Value of Stati... by masklinn on Monday July 26, 2010 @02:46AM (#1547336)
The problem is that, though operations flow better, it's a good way to hide bugs until you've completely lost its context, and then finding out its source is a pain unless you have a backtracking debugger.

An option type, especially one which allows you to lift operations into it (as Haskell's does) is a much better solution as it gives the programmer the choice of behavior: does he not care and just want to keep his option, or does he want to know and unwrap the value within the container?

Objective-C allows half of this, but it's generally the wrong half.

Most other statically typed languages allow neither solution and are therefore broken.

There are no comments on this comment yet.