Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
To: yminsky@cs.cornell.edu
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Poly variants
Date: Sat, 18 Dec 2004 10:29:20 +0900 (JST)	[thread overview]
Message-ID: <20041218.102920.11594834.garrigue@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <891bd339041217113059c3998e@mail.gmail.com>

From: Yaron Minsky <yminsky@gmail.com>

> Egad!  I wish someone had announced this!  Our code uses all sorts of
> lower-case variants.  Is there a serious possibility of this going
> away?  And if so, why?  And if so, wouldn't a warning of some kind
> have been appropriate?
>
> > http://caml.inria.fr/ocaml/htmlman/manual011.html
> > 
> > Note on variant tags: the current implementation accepts lowercase
> > variant tags in addition to uppercase variant tags, but we suggest you
> > avoid lowercase variant tags for portability and compatibility with
> > future OCaml versions.

The reason lower-case are left in the compiler is historical.
It was decided that in ocaml 3 variants shall all be upper-case,
but in ocaml 2.99 lower-case was still allowed for compatibility with
libraries imported from Objective Label.
Then I completely forgot to remove them from the compiler, and by the
time we realised that this was not conform to the spec (ocaml 3.02 or
later) it was a bit late to make a sudden change.

So the situation is that the implementation is not conform to the
specification, but there is no plan to change the implementation as
this is not a dangerous problem. Maybe the specification will change
in ocaml 4 (if it happens).

By the way, here are the pros and cons
* Pro lowercase: personally I tend to use them for phantom types, to
   make clear these tags are not values. Others might have other
   meanings for them.
* Por uppercase only: some find it more coherent. Also this allows one
   more kind of identifiers (i.e. backquote + lowercase), if we
   desperately need them for another use.

Jacques Garrigue


      parent reply	other threads:[~2004-12-18  1:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-17 18:24 Christophe TROESTLER
2004-12-17 18:45 ` [Caml-list] " Tiago Dionizio
2004-12-17 19:05   ` Christophe TROESTLER
2004-12-18  1:04     ` skaller
2004-12-17 19:30   ` Yaron Minsky
2004-12-17 19:43     ` Christophe TROESTLER
2004-12-17 20:11       ` Yaron Minsky
2004-12-17 21:00         ` Christophe TROESTLER
2004-12-17 21:36           ` Yaron Minsky
2004-12-17 22:50     ` Damien Doligez
2004-12-18  1:29     ` Jacques Garrigue [this message]

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=20041218.102920.11594834.garrigue@math.nagoya-u.ac.jp \
    --to=garrigue@math.nagoya-u.ac.jp \
    --cc=caml-list@inria.fr \
    --cc=yminsky@cs.cornell.edu \
    /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