From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 687BABB84 for ; Fri, 16 Jun 2006 23:41:24 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k5GLfN8N026132 for ; Fri, 16 Jun 2006 23:41:23 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA16335 for ; Fri, 16 Jun 2006 23:41:23 +0200 (MET DST) Received: from smtp.cegetel.net (mf00.sitadelle.com [212.94.174.67]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k5GLfMk2026127 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Fri, 16 Jun 2006 23:41:23 +0200 Received: from [192.168.144.129] (unknown [84.5.235.49]) by smtp.cegetel.net (Postfix) with ESMTP id 01CED1A432C; Fri, 16 Jun 2006 23:41:21 +0200 (CEST) Message-ID: <44932581.4010809@univ-savoie.fr> Date: Fri, 16 Jun 2006 23:41:21 +0200 From: Christophe Raffalli User-Agent: Thunderbird 1.5.0.4 (Macintosh/20060530) MIME-Version: 1.0 To: Christophe Raffalli Cc: oleg@pobox.com, caml-list@inria.fr Subject: Re: [Caml-list] Resumable exceptions in plain OCaml References: <20060614225403.69F73AC97@Adric.metnet.fnmoc.navy.mil> <4493239E.2050102@univ-savoie.fr> In-Reply-To: <4493239E.2050102@univ-savoie.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Miltered: at concorde with ID 44932583.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 44932582.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; christophe:01 raffalli:01 raffalli:01 univ-savoie:01 ocaml:01 christophe:01 camlp:01 syntax:01 foo:01 foo:01 ocaml:01 polymorphic:01 polymorphic:01 caml-list:01 matched:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 Christophe Raffalli a écrit : > > Hi, > > may be a little camlp4 would lead to a more natural and readable > syntax. The idea is nice but the > > rraise (Foo i) (fun e -> try raise e with Foo_r1 x -> ...) looks > confusing > yet another remark rraise (Foo i) (function Foo_r1 x -> ... | e -> raise e) seems shorter, equivalent and more efficient. Am I wrong ? remark: it seems one very rarely use exceptions as values passed to function and matched with normal match ... but this is completely legal in OCaml ! In fact exceptions in OCaml are one big polymorphic variant type that existed before polymorphic variant where introduced ;-) Christophe Raffalli