From: Lauri Alanko <la@iki.fi>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Exceptions considered harmful
Date: Sun, 4 Jul 2004 10:30:50 +0300 [thread overview]
Message-ID: <20040704073050.GA907@la.iki.fi> (raw)
In-Reply-To: <1088470968.18587.123.camel@pelican.wigram>
On Tue, Jun 29, 2004 at 11:02:49AM +1000, skaller wrote:
> Any comments on any of this appreciated.
The paper "Exceptional Syntax" by Nick Benton and Andrew Kennedy would
probably interest you. It's published in JFP 11(4), 2001, and an
electronic copy can probably be found somewhere in the net. They propose
an exception syntax that is closer to Haskell's monadic style: an
expression either returns a value or raises an exception, so catching an
exception is like pattern matching: there's one case for the returned
value, others for possible exceptions:
try
x <- foo ()
in
bar ()
unless
E1 -> handle1 ()
E2 -> handle2 ()
To my mind this seems very sensible.
Lauri Alanko
la@iki.fi
-------------------
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
next prev parent reply other threads:[~2004-07-04 17:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20040628143917.GA21847@fichte.ai.univie.ac.at>
[not found] ` <Pine.LNX.4.44.0406290056580.1229-100000@localhost>
[not found] ` <20040628173400.GB26193@fichte.ai.univie.ac.at>
2004-06-29 1:02 ` skaller
2004-07-04 7:30 ` Lauri Alanko [this message]
2004-07-04 20:16 ` Christophe TROESTLER
2004-07-04 20:24 ` Michael Hicks
2004-07-05 3:42 ` skaller
2004-07-11 13:12 ` [Caml-list] " Richard Cole
2004-06-29 18:05 [Caml-list] " Brandon J. Van Every
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=20040704073050.GA907@la.iki.fi \
--to=la@iki.fi \
--cc=caml-list@inria.fr \
/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