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 TAA16101; Tue, 15 Jan 2002 19:11:08 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA15702 for caml-list@pauillac.inria.fr; Tue, 15 Jan 2002 19:11:08 +0100 (MET) 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 SAA14266 for ; Tue, 15 Jan 2002 18:08:57 +0100 (MET) Received: from thalia.fm.intel.com (fmfdns02.fm.intel.com [132.233.247.11]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g0FH8pb10795; Tue, 15 Jan 2002 18:08:51 +0100 (MET) Received: from fmsmsxvs042.fm.intel.com (fmsmsxv042-1.fm.intel.com [132.233.48.110]) by thalia.fm.intel.com (8.9.1a+p1/8.9.1/d: relay.m4,v 1.48 2001/12/13 16:27:50 root Exp $) with SMTP id RAA20636; Tue, 15 Jan 2002 17:08:47 GMT Received: from fmsmsx26.fm.intel.com ([132.233.42.26]) by fmsmsxvs042.fm.intel.com (NAVGW 2.5.1.16) with SMTP id M2002011509105113638 ; Tue, 15 Jan 2002 09:10:51 -0800 Received: by fmsmsx26.fm.intel.com with Internet Mail Service (5.5.2653.19) id ; Tue, 15 Jan 2002 09:08:46 -0800 Message-ID: From: "Harrison, John R" To: "'Xavier Leroy'" , Brian Rogoff Cc: caml-list@inria.fr Subject: RE: [Caml-list] Caml historical question Date: Tue, 15 Jan 2002 09:08:41 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi Xavier, | What is deprecated in OCaml, but was supported in Caml Light and Caml V3.1, | is multiple-case "fun": | fun pat11 ... patN1 -> expr1 | | ... | | pat1M ... patNM -> exprM | Although this form subsumes the previous two, the extra generality was | rarely useful, and complex patterns have to be parenthesized so that | the parser can figure them out. I used it quite a lot in CAML Light, and had to uglify my code to get the same effect in OCaml. It seems to me that the extra generality does no harm, and sometimes makes code a bit shorter and clearer. I can understand the need for separate "fun" and "function" to deal with ambiguities when multiple adjacent patterns are in a match. But I don't see any reason at all to restrict "fun" to a single case. Surely there are no substantial parsing subtleties here that don't arise anyway in other cases? There are clear delimiters "|" and "->" around each (multiple) pattern. John. ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr