Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] Future of labels
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-04-09 (15:07)
From: Fergus Henderson <fjh@c...>
Subject: Re: [Caml-list] Future of labels, and ideas for library labelling
On 09-Apr-2001, Jacques Garrigue <> wrote:
> From: John Max Skaller <>
> >
> > 	The next step is to eliminate the duality in the libraries.
> > This will probably require some cleanups in the core language,
> > as well as some willingness for users to migrate.
> Well, after listening to reactions, I think this next step first means
> reducing the number of duplicated labelized libraries, by admitting
> that we don't need labels in all libraries: Objective Label tried to
> offer a unified view with labels everywhere, but this is not practical
> with OCaml.  In particular, traditional OCaml users are not willing to
> migrate.

I think it would be nicer to keep the labels in the standard library,
but allow the omission of explicit labels in calls (at least in cases
where this is unambiguous), as in the current "classic" mode.
Then those who wish to can use labels, and those who don't wish to
don't have to.

You could also have a "style-checking" compiler option to require labels
in calls if the function is defined with labels.  But unlike the current
"-labels" option, this option should just restrict you to a subset of
the language; it should not permit any programs that are not permitted
with the default options.

> Then, further integration will only happen by natural adaptation:
> the standard library will stay without labels, but outside of that
> people choose the library whose design they like, be it with or
> without labels.  This is no longer a problem of being in one or the
> other community.

One problem with this approach is that it leads to mixing of different
styles, since any given piece of code may contain calls to several
different libraries, and with your proposed approach the style used
in the caller is determined by how the callee is written.

[Note: I haven't actually written any non-trivial OCaml programs.
This is just my opinion based on experience with other languages.]

Fergus Henderson <>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <>  |     -- the last words of T. S. Garp.
To unsubscribe, mail  Archives: