From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA29671; Sun, 4 Jul 2004 19:31:58 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA29727 for ; Sun, 4 Jul 2004 19:31:57 +0200 (MET DST) Received: from mail.cs.helsinki.fi (courier.cs.helsinki.fi [128.214.9.1]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i64HVuEV017006 for ; Sun, 4 Jul 2004 19:31:56 +0200 Received: from alkokrunni.cs.Helsinki.FI (alkokrunni.cs.helsinki.fi [::ffff:128.214.9.149]) (IDENT: root, AUTH: PLAIN cs-relay, TLS: TLSv1/SSLv3,168bits,DES-CBC3-SHA) by mail.cs.helsinki.fi with esmtp; Sun, 04 Jul 2004 20:31:55 +0300 Received: from alkokrunni.cs.Helsinki.FI (localhost [127.0.0.1]) by alkokrunni.cs.Helsinki.FI (8.12.8/8.12.8) with ESMTP id i64HVoR3005192; Sun, 4 Jul 2004 20:31:50 +0300 Received: from localhost (lealanko@localhost) by alkokrunni.cs.Helsinki.FI (8.12.8/8.12.8/Submit) with SMTP id i64HVl1K005158; Sun, 4 Jul 2004 20:31:47 +0300 X-Authentication-Warning: alkokrunni.cs.Helsinki.FI: lealanko owned process doing -bs Received: from la by la.iki.fi with local (Exim 3.36 #1 (Debian)) id 1Bh1Sf-0000Yd-00; Sun, 04 Jul 2004 10:30:53 +0300 Date: Sun, 4 Jul 2004 10:30:50 +0300 From: Lauri Alanko To: caml-list@inria.fr Subject: Re: [Caml-list] Exceptions considered harmful Message-ID: <20040704073050.GA907@la.iki.fi> References: <20040628143917.GA21847@fichte.ai.univie.ac.at> <20040628173400.GB26193@fichte.ai.univie.ac.at> <1088470968.18587.123.camel@pelican.wigram> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <1088470968.18587.123.camel@pelican.wigram> User-Agent: Mutt/1.5.5.1+cvs20040105i X-Miltered: at nez-perce with ID 40E83F0C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; lauri:01 alanko:01 caml-list:01 2004:99 benton:01 haskell's:01 monadic:01 foo:01 lauri:01 alanko:01 raises:01 syntax:02 syntax:02 catching:02 exception:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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