
On Sun, May 25, 2008 at 01:28:45PM +0100, Neil Mitchell wrote:
Hi
If mzero, there's less gained over Maybe, but still no guarantee of safety.
If a program has a safety problem with mzero, that anyway needs to be detected. So I don't think that will have an effect on overall program safety, it's an orthogonal safety concern.
I don't think this is the case.
mzero vs. Nothing
One doesn't crash, the other may crash depending on what is floating around. Perhaps I've used type inference extensively, and the actual decision of what mzero means is 10 functions away. Now its really hard to see the program is safe, versus not.
Can you name a single instance of MonadPlus in the standard libraries where mzero uses error or undefined? The closest example I can think of is the instance for IO which throws an exception, but this really isn't the same as crashing. Cheers, Spencer Janssen