From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 97318BB91 for ; Sat, 18 Dec 2004 02:05:01 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iBI151MG014327 for ; Sat, 18 Dec 2004 02:05:01 +0100 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 CAA20851 for ; Sat, 18 Dec 2004 02:05:00 +0100 (MET) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBI14wcd000772 for ; Sat, 18 Dec 2004 02:04:59 +0100 Received: from [192.168.1.200] (ppp196-155.lns1.syd2.internode.on.net [203.122.196.155]) by smtp3.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id iBI14sGa053434; Sat, 18 Dec 2004 11:34:56 +1030 (CST) Subject: Re: [Caml-list] Poly variants From: skaller Reply-To: skaller@users.sourceforge.net To: Christophe TROESTLER Cc: caml-list In-Reply-To: <20041217.200504.62972054.Christophe.Troestler@umh.ac.be> References: <20041217.192413.37282635.Christophe.Troestler@umh.ac.be> <20041217.200504.62972054.Christophe.Troestler@umh.ac.be> Content-Type: text/plain Message-Id: <1103331894.4711.166.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 18 Dec 2004 12:04:54 +1100 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 41C3823D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41C3823A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 variants:01 sourceforge:01 christophe:01 troestler:01 wrote:01 wrote:01 christophe:01 troestler:01 umh:01 lowercase:01 lowercase:01 ocaml:01 ocaml:01 bug:01 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: On Sat, 2004-12-18 at 06:05, Christophe TROESTLER wrote: > On Fri, 17 Dec 2004, Tiago Dionizio wrote: > > > > On Fri, 17 Dec 2004 19:24:13 +0100 (CET), Christophe TROESTLER > > wrote: > > > Hi, > > > > > > Objective Caml version 3.08.2 > > > # `a;; > > > - : [> `a ] = `a > > > > > > Is the lack of capitalisation in the tag-name really wanted? > > > > Note on variant tags: the current implementation accepts lowercase > > variant tags in addition to uppercase variant tags, but we suggest you > > avoid lowercase variant tags for portability and compatibility with > > future OCaml versions. > > Thanks, I read too fast ;) -- hopefully this will be removed soon. Why? Capitalisation is a really nasty hack, to get around the lack of characters in the ASCII character set. The idea is also seriously incompatible with an i18n version of Ocaml, which should follow ISO Standards with respect to acceptable identifiers: these include letters from many human languages, some of which lack any concept of capitalisation. I went to some trouble in Felix to avoid this bug. All 'names' can use any 'unicode' letter. There is a price -- in Felix patterns you can see match x with | ctor ?v => ... a ? is needed to distinguish variables from constructors. Polymorphic variants use lead ` character, so don't suffer from this capitalisation hack. -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net