Why no exceptions in Haskell?

Nicolas Oury noury@ens-lyon.fr
Thu, 22 Nov 2001 19:40:16 +0100 (MET)


Hello,
I may be wrong but I think that one reason is that this piece of code :
try
(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
predict.)
Greetings,
Nicolas Oury 

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?
> 
> 
> Michael
> 
> 
> 
> 
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>