English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Checked exceptions and type inference
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-03-12 (20:39)
From: Brian Hurt <brian.hurt@q...>
Subject: Re: [Caml-list] Checked exceptions and type inference
On Wed, 12 Mar 2003, Richard W.M. Jones wrote:

> On Tue, Mar 11, 2003 at 03:50:13PM -0600, Brian Hurt wrote:
> > Is there any research on using checked exceptions in an ML derived 
> > language?  Any plans/opinions on implementing checked exceptions in Ocaml?
> Please no.

I'm not sure where I sit in this debate.

On one hand, if you view exceptions as 'error returns' (End of File, etc),
then checked exceptions make sense.  Some errors need to be handled.  And
handling them should be required.  On the other hand, if you view
exceptions as 'probably fatal exceptional conditions' (Out of Memory, 
etc), then having to deal with them is simply a nuisance.  What else can 
you do except print out an error message, clean up, and exit?

Now, for the trick question: is Not_found an error return, or a probably 
fatal exceptional condition?

And yes, I've had fun with Java exceptions as well, which is the only 
reason I'm wimbling.  And failure modes do expose the internal workings of 
an object (or a function, or whatever atom of generalization you are 


To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners