caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Brian Hurt <brian.hurt@qlogic.com>
To: "Richard W.M. Jones" <rich@annexia.org>
Cc: Ocaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Checked exceptions and type inference
Date: Wed, 12 Mar 2003 14:49:57 -0600 (CST)	[thread overview]
Message-ID: <Pine.LNX.4.33.0303121440550.2164-100000@eagle.ancor.com> (raw)
In-Reply-To: <20030312172011.GB11435@redhat.com>

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 
using).

Brian


-------------------
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


  reply	other threads:[~2003-03-12 20:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-11 21:50 Brian Hurt
2003-03-12  5:40 ` Jacques Garrigue
2003-03-12  8:45 ` Xavier Leroy
2003-03-12 10:12   ` Stefano Zacchiroli
2003-03-12 16:34     ` Xavier Leroy
2003-03-12 17:20 ` Richard W.M. Jones
2003-03-12 20:49   ` Brian Hurt [this message]
2003-03-12 18:45 ` William Chesters
2003-03-12  3:00 Arturo Borquez
2003-03-12  3:24 ` Nicolas Cannasse
2003-03-12  3:43 ` mgushee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.33.0303121440550.2164-100000@eagle.ancor.com \
    --to=brian.hurt@qlogic.com \
    --cc=caml-list@inria.fr \
    --cc=rich@annexia.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).