Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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 Archives:
Bug reports: FAQ:
Beginner's list: