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 WAA02495; Sun, 4 Jul 2004 22:20:59 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 WAA02369 for ; Sun, 4 Jul 2004 22:20:58 +0200 (MET DST) Received: from xizor.is.scarlet.be (xizor.is.scarlet.be [193.74.71.21]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i64KKuEV001690 for ; Sun, 4 Jul 2004 22:20:57 +0200 Received: from (u195-95-85-173.dialup.planetinternet.be [195.95.85.173]) by xizor.is.scarlet.be with ESMTP id i64KKnX11711; Sun, 4 Jul 2004 22:20:49 +0200 Received: from poincare ([127.0.0.1] helo=localhost ident=trch) by poincare with esmtp (Exim 3.36 #1 (Debian)) id 1BhDPD-0004c0-00; Sun, 04 Jul 2004 22:16:07 +0200 Date: Sun, 04 Jul 2004 22:16:07 +0200 (CEST) Message-Id: <20040704.221607.42992936.debian00@tiscali.be> To: la@iki.fi Cc: "O'Caml Mailing List" Subject: Re: [Caml-list] Exceptions considered harmful From: Christophe TROESTLER In-Reply-To: <20040704073050.GA907@la.iki.fi> References: <20040628173400.GB26193@fichte.ai.univie.ac.at> <1088470968.18587.123.camel@pelican.wigram> <20040704073050.GA907@la.iki.fi> Organization: None X-Spook: AVN ASDIC enemy of the state Europol 64 Vauxhall Cross csystems bootleg pink noise global kilderkin X-Mailer-URL: http://www.mew.org/ X-Operating-System: GNU/Linux (http://www.linux.org/) X-Blessing: Om Ah Hum Vajra Guru Pema Siddhi Hum X-Mailer: Mew version 4.0.61 on Emacs 21.3.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 40E866A8.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 troestler:01 tiscali:99 lauri:01 alanko:01 haskell's:01 monadic:01 foo:01 sensibly:01 ocaml':01 foo:01 chris:01 christophe:01 raises:01 syntax:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sun, 4 Jul 2004, Lauri Alanko wrote: > > 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 () How is this sensibly different from OCaml' syntax? try x <- foo(); bar() with | E1 -> handle1() | E2 -> handle2() ChriS ------------------- 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