On Sat, Mar 28, 2009 at 10:53 AM, Ketil Malde <ke...@malde.org> wrote: > So the difference between an exception or an error type is mainly what > you intend to do about it. There's no point in wrapping divisions in > Maybe unless you actually are able to do something useful to recover > from a zero denominator.
That is exactly the point I was trying to make. When I write a code, I can't say in advance, in what way it will be used. So, for dealing with errors, I have to choose one way or another, mostly without that knowledge. When I'm using e.g. C++, it's easy: something like mantra "when in doubt, throw an exception" :-) combined with RAII, works good (but not ideal, of course). So, I'll ask again: when I program in Haskell, what mechanism should I use? Gregory _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe