Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: Syntax for label
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: Syntax for label (and more)
There have been quite a few interesting topics raised on this list
recently, so here is a bunch of quick replies:

- Renaming of exceptions: this will be in 3.00, with the syntax
"exception E = E'".  I implemented this some time ago, but it didn't
make it in 2.04 for various reasons.

- Inclusion of structures into larger structures (in the style of
"open" in SML): I agree this is desirable, and we already have the
syntax for it ("struct ... include S ... end").  It requires a little
more implementation work than exception renaming, so I'll probably do
it for 3.01.

- User contributions to the standard library: I'm open to concrete
proposals on this.  One of the reasons why the OCaml standard library
modules have remained minimal is that it's often hard to know what
would be useful to a significant fraction of users (as opposed to
functions that only their author is going to use).  Also, we must be
careful to keep the standard library manageable, e.g. with consistent
naming conventions and good documentation.  For all these aspects,
some kind of peer reviewing of new extensions sounds good.

- Regarding user accounts on a CVS repository at INRIA: we can open
accounts on the "auxiliary" CVS server, camlcvs.inria.fr, if anyone
needs them.  That server is currently an aging Sparc 10 under SunOS
4(!), and therefore not very pleasant to use, but I have more modern
hardware available to upgrade it; it's just a question of finding time
to install it.  Also, note that for security reasons, you'll have to
use SSH to access it.  If you'd rather use Sourceforge or a similar
system, that's fine with us too, we'll put links on our Web sites.

- Syntax of labels and labeling policy for libraries: now is an
excellent time to discuss those issues, because it's much easier to
change now than after 3.00 is out.  Concerning the syntax of labels,
":" reads nicely, but I'm a bit bothered by having to type "(x : t)"
for a type constraint rather than "(x: t)".  Backward compatibility
with OLabl is an argument, but backward compatibility with OCaml, Caml
Light, SML, Classic ML, etc, is a much stronger one!

Looking at the OCaml lexer, the following 1-character symbols are
(mostly) up for grabs:
        $       (user-definable infix symbol currently)
        %       (ditto)
        &       (currently deprecated synonymous for &&)
        \       (never used so far)
        ~       (user-definable prefix symbol currently)

I can't say that any of these look particularly good as a label
delimiter, although (tongue in cheek) those of us who type a lot of
TeX are already used to "a~b" meaning some kind of punctation between
a and b...

Opinions?

- Xavier Leroy