From: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
To: ohl@hep.tu-darmstadt.de
Cc: caml-list@inria.fr
Subject: Re: Question about O'Caml 3
Date: Fri, 28 Apr 2000 09:52:38 +0900 [thread overview]
Message-ID: <20000428095238I.garrigue@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: Your message of "Thu, 27 Apr 2000 14:16:52 +0200" <200004271216.OAA14373@heplix4.ikp.physik.tu-darmstadt.de>
From: Thorsten Ohl <ohl@hep.tu-darmstadt.de>
> 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
<A HREF=http://wwwfun.kurims.kyoto-u.ac.jp/~garrigue/>JG</A>
next prev parent reply other threads:[~2000-04-28 10:06 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 [this message]
2000-04-28 10:00 ` Thorsten Ohl
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=20000428095238I.garrigue@kurims.kyoto-u.ac.jp \
--to=garrigue@kurims.kyoto-u.ac.jp \
--cc=caml-list@inria.fr \
--cc=ohl@hep.tu-darmstadt.de \
/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