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] Exceptions considered harmful
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-07-04 (17:31)
From: Lauri Alanko <la@i...>
Subject: Re: [Caml-list] Exceptions considered harmful
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:

  x <- foo ()
  bar ()
  E1 -> handle1 ()
  E2 -> handle2 ()

To my mind this seems very sensible.

Lauri Alanko

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: