Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Thorsten Ohl <ohl@hep.tu-darmstadt.de>
To: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
Cc: ohl@hep.tu-darmstadt.de, caml-list@inria.fr
Subject: Re: Question about O'Caml 3
Date: Fri, 28 Apr 2000 12:00:11 +0200 (CEST)	[thread overview]
Message-ID: <14601.24875.288727.301498@heplix4.ikp.physik.tu-darmstadt.de> (raw)
In-Reply-To: <20000428095238I.garrigue@kurims.kyoto-u.ac.jp>

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]




  reply	other threads:[~2000-04-28 10:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-27 12:16 Thorsten Ohl
2000-04-28  0:52 ` Jacques Garrigue
2000-04-28 10:00   ` Thorsten Ohl [this message]
2000-04-28  2:10 ` O'Caml 3 doco John Max Skaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14601.24875.288727.301498@heplix4.ikp.physik.tu-darmstadt.de \
    --to=ohl@hep.tu-darmstadt.de \
    --cc=caml-list@inria.fr \
    --cc=garrigue@kurims.kyoto-u.ac.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox