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-03 (14:04)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: [Caml-list] Future of labels, and ideas for library labelling
Last message before I make a needed pause, since I think lots of
people are already discarding this thread anyway.

I just repeat here what was my last proposal, since it was in the
middle of a mail, and some interested people may have not read it.
At least, they don't seem to have read it.
(It's only a personal idea.)

* make label mode the default mode
* keep a nolabel mode similar to current classic mode, but not
  allowing non-optional labels in function calls
* remove all labels from the standard library
* introduce a module StdLabels containing labelized versions of List
  and Array for labellers
* add some extra labelized versions of a few functions: 
  Pervasives.output', Pervasives.input', Pervasives.really_input',
  Array.blit', String.blit'
  and maybe also String.sub', String.fill', Buffer.add_substring',
  Hashtbl.add', Map.add'.

Remark that this does not change anything for people who didn't use
labels before: label mode is a conservative extension of ocaml 2, so
you don't even need to use the nolabel mode.

From: Jean-Christophe Filliatre <>
> Jacques Garrigue writes:
>  > Unfortunately, I see not very much enthusiasm for the classic mode.
> First, let me say that probably most users of the classic mode are not
> even aware  of what  labels are,  are not reading  this thread  or are
> reading it but without participating. I  was one of the latter (and to
> be more precise, we are many in that case in the team where I work).

Oh no, I was not underestimating your number; and I was indeed anxious
of getting advice from people like you. It was clear enough to me that
the answers I was collecting were not very representative.

> But you want enthusiasm, I'll give you some.
> I've written dozens of thousands lines of Caml code, and I'm currently
> maintaining more  than one hundred thousands lines.  And I'm perfectly
> happy with the  classic mode. I recognize that  labels may be helpful,
> even necessary  in some particular  situations, but I don't  need them
> *at all*  and I wouldn't like to  be forced to switch  to a compulsory
> label-mode, nor to have to explain to the students the meaning of this
> constraint.

Thank you for your enthousiasm :-)
But by my category you are not an happy user of classic mode (even if
you are happy using it): you do not use any of the features of classic
mode that would be lost in this change, which are related to using
labels, but in a not-so-strict way.

Either you are ready to write labels when the writer of the library
has put some, and you just use the default mode (no labels in standard
libraries anyway). (That is, only if you need to use 3rd party libraries)

Either you have strong feelings against labels, and you use the
nolabel mode. The only problem is that examples coming with libraries
that use labels might need some easy rewriting.

If you could express yourself on this point, it would be interesting.
I am not at all convinced that this is an ideal solution, but I would
like to know what would bother you in it.

Best regards,
and thanks for ready my long mails

Jacques Garrigue
To unsubscribe, mail  Archives: