Version française
Home     About     Download     Resources     Contact us    
Browse thread
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christian Gillot <cgillot@g...>
Subject: Re: [Caml-list] Re: about toplevels
Hi,

Mensaje citado por: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>:

> > 3. the exceptions are NOT polymorphics 
> > exception of 'a list is WRONG.
> 
> If they were, they could break the type system:
> 
>    exception Foo of 'a list;;
>    try raise Foo [3] with Foo l -> "abc" :: l;;

I agree with you, it's logic. But as a newbie you
easily stumble on this, because you just begin
to like the type polymorphism and suddenly you don't 
understand why there is an exception (perdon me the pun)
to this rule with the exceptions. Of course there's always
good people like you or M. Monniaux (Thanks to him) to explain
this. That's what is called a gotcha, I guess.

Regards,

--
Christian Gillot <cgillot@gruposbd.com>
GNU/Linux developer
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr