Why no exceptions in Haskell?
Thu, 22 Nov 2001 19:40:16 +0100 (MET)
I may be wrong but I think that one reason is that this piece of code :
(raise A) + (raise B)
with A -> 1
| B -> 2 (in CAML lyke style)
booth reduce to 1 and to 2, depending of the order of evaluation of the
arguments of a function call.
That is something quite dangerous and not wanted in Haskell (where
moreover sue to lazyness, the order of evaluation is difficult to
On Thu, 22 Nov 2001, Michael Marte wrote:
> Hello *,
> I am just curious: Why does Haskell not provide exceptions a la SML?
> Why does only the IO monad allow for exceptions?
> Haskell-Cafe mailing list