[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Thorsten Ohl <ohl@h...> |
| Subject: | Re: Question about O'Caml 3 |
Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp> 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]