Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: Christophe TROESTLER <Christophe.Troestler@umh.ac.be>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Poly variants
Date: 18 Dec 2004 12:04:54 +1100	[thread overview]
Message-ID: <1103331894.4711.166.camel@pelican.wigram> (raw)
In-Reply-To: <20041217.200504.62972054.Christophe.Troestler@umh.ac.be>

On Sat, 2004-12-18 at 06:05, Christophe TROESTLER wrote:
> On Fri, 17 Dec 2004, Tiago Dionizio <tngd81@gmail.com> wrote:
> > 
> > On Fri, 17 Dec 2004 19:24:13 +0100 (CET), Christophe TROESTLER
> > <Christophe.Troestler@umh.ac.be> wrote:
> > > Hi,
> > > 
> > >         Objective Caml version 3.08.2
> > > # `a;;
> > > - : [> `a ] = `a
> > > 
> > > Is the lack of capitalisation in the tag-name really wanted?
> > 
> > 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.
> 
> Thanks, I read too fast ;) -- hopefully this will be removed soon.

Why? Capitalisation is a really nasty hack, to get around
the lack of characters in the ASCII character set.

The idea is also seriously incompatible with
an i18n version of Ocaml, which should follow
ISO Standards with respect to acceptable identifiers:
these include letters from many human languages,
some of which lack any concept of capitalisation.

I went to some trouble in Felix to avoid this bug.
All 'names' can use any 'unicode' letter.
There is a price -- in Felix patterns you can see

	match x with | ctor ?v => ...

a ? is needed to distinguish variables from
constructors.

Polymorphic variants use lead ` character, so don't suffer
from this capitalisation hack.

-- 
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net




  reply	other threads:[~2004-12-18  1:05 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 [this message]
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

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=1103331894.4711.166.camel@pelican.wigram \
    --to=skaller@users.sourceforge.net \
    --cc=Christophe.Troestler@umh.ac.be \
    --cc=caml-list@inria.fr \
    /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