From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA06700 for caml-redist; Fri, 28 Apr 2000 12:06:57 +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 CAA02580 for ; Fri, 28 Apr 2000 02:57:20 +0200 (MET DST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id CAA19035 for ; Fri, 28 Apr 2000 02:57:18 +0200 (MET DST) Received: from localhost (sansho.kurims.kyoto-u.ac.jp [130.54.16.90]) by kurims.kurims.kyoto-u.ac.jp (8.9.3/3.7W) with ESMTP id JAA16064; Fri, 28 Apr 2000 09:52:39 +0900 (JST) To: ohl@hep.tu-darmstadt.de Cc: caml-list@inria.fr Subject: Re: Question about O'Caml 3 In-Reply-To: Your message of "Thu, 27 Apr 2000 14:16:52 +0200" <200004271216.OAA14373@heplix4.ikp.physik.tu-darmstadt.de> References: <200004271216.OAA14373@heplix4.ikp.physik.tu-darmstadt.de> X-Mailer: Mew version 1.93 on Emacs 20.5 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20000428095238I.garrigue@kurims.kyoto-u.ac.jp> Date: Fri, 28 Apr 2000 09:52:38 +0900 From: Jacques Garrigue X-Dispatcher: imput version 980905(IM100) Sender: weis From: Thorsten Ohl > Contrary to the documentation, O'Caml 3.00 accepts, lowercase > identifiers for polymorphic variants. > > ohl@heplix4:~Mail$ ocaml > Objective Caml version 3.00 > > # `foo;; > - : [> `foo] = `foo > > Who's right: the compiler or the manual? Well, we were so busy discussing label syntax that this point was not debated before 3.00. The current answer is: both are correct. If you want to be on the safe side, better not to use lowercase variants, since they could be removed in the future. Also they are probably not so nice if you are really intending to use them as sum types, which are usually identified by their uppecase first letter. On the other hand, I have a personal liking for lowercase variants, at least when they have only an abstract meaning (not really used as values, but rather as types, and types are lowercase). Some libraries, namely lablGL and lablGTK (only internally for lalblGTK), actually use lowercase labels, so I prefered to keep them for now in the compiler, as they are not harmful, rather than having to correct everything before a real decision is taken. --------------------------------------------------------------------------- Jacques Garrigue Kyoto University garrigue at kurims.kyoto-u.ac.jp JG