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 MAA01461 for caml-redist; Fri, 28 Apr 2000 12:20:27 +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 MAA07100 for ; Fri, 28 Apr 2000 12:01:55 +0200 (MET DST) Received: from heplix4.ikp.physik.tu-darmstadt.de (heplix4.ikp.physik.tu-darmstadt.de [130.83.24.139]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id MAA06728 for ; Fri, 28 Apr 2000 12:01:55 +0200 (MET DST) Received: (from ohl@localhost) by heplix4.ikp.physik.tu-darmstadt.de (8.9.3/8.9.3) id MAA21349; Fri, 28 Apr 2000 12:00:11 +0200 X-Authentication-Warning: heplix4.ikp.physik.tu-darmstadt.de: ohl set sender to ohl@heplix4.ikp.physik.tu-darmstadt.de using -f From: Thorsten Ohl Message-ID: <14601.24875.288727.301498@heplix4.ikp.physik.tu-darmstadt.de> Date: Fri, 28 Apr 2000 12:00:11 +0200 (CEST) To: Jacques Garrigue Cc: ohl@hep.tu-darmstadt.de, caml-list@inria.fr Subject: Re: Question about O'Caml 3 In-Reply-To: <20000428095238I.garrigue@kurims.kyoto-u.ac.jp> References: <200004271216.OAA14373@heplix4.ikp.physik.tu-darmstadt.de> <20000428095238I.garrigue@kurims.kyoto-u.ac.jp> X-Mailer: VM 6.74 under Emacs 20.3.1 Reply-To: ohl@hep.tu-darmstadt.de Sender: weis Jacques Garrigue writes: > 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). When ocaml-2.99 came out I tried to pick up idioms with polymorphic variants from the lablgtk sources and I was very confused by this ambiguity. As you said, the lowercase polymorphic variants appeared to be used more like types and the uppercase polymorphic variants appeared to be usd more like sum types. However, the lowercase polymorphic variants were not mentioned anywhere ... >>From the compiler sources, I then found out that there is no difference and assumed (apparently correctly) that they are there for olabl compatibility. I'm not complaining about lack of documentation, but I want to point out that such ambiguities make it hard for novices (it's my fault, that I hadn't studied olabl before, of course) to pick up proper idioms in a programming language. Cheers, -Thorsten -- Thorsten Ohl, Physics Department, TU Darmstadt -- ohl@hep.tu-darmstadt.de http://heplix.ikp.physik.tu-darmstadt.de/~ohl/ [<=== PGP public key here]