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 VAA14510; Tue, 21 Oct 2003 21:46:45 +0200 (MET DST) 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 VAA19195 for ; Tue, 21 Oct 2003 21:46:43 +0200 (MET DST) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h9LJkh121526 for ; Tue, 21 Oct 2003 21:46:43 +0200 (MET DST) Received: from clipper.ens.fr (clipper-gw.ens.fr [129.199.1.22]) by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id h9LJkLcp088192 ; Tue, 21 Oct 2003 21:46:21 +0200 (CEST) Received: from localhost (frisch@localhost) by clipper.ens.fr (8.12.3/jb-1.1) id h9LJkI5V012958 ; Tue, 21 Oct 2003 21:46:18 +0200 (MET DST) X-Authentication-Warning: clipper.ens.fr: frisch owned process doing -bs Date: Tue, 21 Oct 2003 21:46:17 +0200 (MET DST) From: Alain.Frisch@ens.fr X-X-Sender: frisch@clipper.ens.fr Reply-To: Alain.Frisch@ens.fr To: William Lovas cc: Caml list , Richard Jones Subject: Re: [Caml-list] OCaml wishlist In-Reply-To: <20031021172812.GA26066@force.stwing.upenn.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; alain:01 frisch:01 caml-list:01 wishlist:01 lovas:01 gotos:01 bytecomp:01 mli:01 type-safe:01 alain:01 ocaml:01 ocaml:01 constructors:01 syntax:02 match:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, 21 Oct 2003, William Lovas wrote: > I don't think it would be beneficial in the long run to clutter up the core > language with these sorts of purely syntactic issues Not quite. Even without escaping loops, the "return" statement is more than syntax. Consider: let f x = ... match .. with | .. -> let .. = (if ... then return "Booh!" else ...) In some cases, GOTOs^Wstatic exceptions are just a decent solution to shortcut the normal functional control flow, and much more efficient than dynamic exceptions. Internally, OCaml has such a mechanism (see bytecomp/lambda.mli, Lstatic* constructors, used for the compilation of pattern matching), which, I guess, could be quite easily be exposed in a type-safe way to the surface language. Note that I'm not really asking for such a feature. -- Alain ------------------- 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