Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Question about O'Caml 3
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-04-28 (10:20)
From: Thorsten Ohl <ohl@h...>
Subject: Re: Question about O'Caml 3
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

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.

Thorsten Ohl, Physics Department, TU Darmstadt -- [<=== PGP public key here]