From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 8C92EBB81 for ; Sat, 18 Dec 2004 02:29:43 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBI1ThgK002647 for ; Sat, 18 Dec 2004 02:29:43 +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 CAA20718 for ; Sat, 18 Dec 2004 02:29:42 +0100 (MET) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBI1TeEt002644 for ; Sat, 18 Dec 2004 02:29:41 +0100 Received: from localhost (suiren [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.13.1/8.13.1) with ESMTP id iBI1TZn8024576; Sat, 18 Dec 2004 10:29:35 +0900 (JST) Date: Sat, 18 Dec 2004 10:29:20 +0900 (JST) Message-Id: <20041218.102920.11594834.garrigue@math.nagoya-u.ac.jp> To: yminsky@cs.cornell.edu Cc: caml-list@inria.fr Subject: Re: [Caml-list] Poly variants From: Jacques Garrigue In-Reply-To: <891bd339041217113059c3998e@mail.gmail.com> References: <20041217.192413.37282635.Christophe.Troestler@umh.ac.be> <891bd339041217113059c3998e@mail.gmail.com> X-Mailer: Mew version 4.0.64 on Emacs 21.3 / 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 41C38807.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41C38804.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 variants:01 yaron:01 minsky:01 yminsky:01 variants:01 ocaml:01 htmlman:01 lowercase:01 lowercase:01 ocaml:01 compiler:01 compiler:01 poly:01 jacques: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: From: Yaron Minsky > Egad! I wish someone had announced this! Our code uses all sorts of > lower-case variants. Is there a serious possibility of this going > away? And if so, why? And if so, wouldn't a warning of some kind > have been appropriate? > > > http://caml.inria.fr/ocaml/htmlman/manual011.html > > > > 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. The reason lower-case are left in the compiler is historical. It was decided that in ocaml 3 variants shall all be upper-case, but in ocaml 2.99 lower-case was still allowed for compatibility with libraries imported from Objective Label. Then I completely forgot to remove them from the compiler, and by the time we realised that this was not conform to the spec (ocaml 3.02 or later) it was a bit late to make a sudden change. So the situation is that the implementation is not conform to the specification, but there is no plan to change the implementation as this is not a dangerous problem. Maybe the specification will change in ocaml 4 (if it happens). By the way, here are the pros and cons * Pro lowercase: personally I tend to use them for phantom types, to make clear these tags are not values. Others might have other meanings for them. * Por uppercase only: some find it more coherent. Also this allows one more kind of identifiers (i.e. backquote + lowercase), if we desperately need them for another use. Jacques Garrigue