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 (12:59)
From: Jean-Christophe Filliatre <Jean-Christophe.Filliatre@l...>
Subject: Re: [Caml-list] Future of labels, and ideas for library labelling

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).

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

You invoke  several arguments, in particular  documentation and static
checking of the code.

As far as  documentation is concerned, the classic  mode is enough for
that  purpose.  Personally,  I  use  a literate  programming  tool  to
document my programs (roughly in the way the ocaml standard library is
documented) and I don't use labels at all for a documentation purpose.

As far as static checking is  concerned, I agree that one can misapply
a function,  confusing for instance  the accumulator and the  value on
which to iterate.  But your arguments are not  convincing at all: your
version of the function building a  set from a list of lists was, from
my point of view, really uglier  than the initial one line version and
more  difficult for  me  to  read and  to  understand (in  particular,
because  I'm  familiar with  List.fold_left  and List.fold_right,  but
that's  rather  normal  to  be  familiar to  one's  favorite  language
standard library). You see, that's a question of programming style. So
why will  a few users  of labels impose  their programming style  to a

To  summarize, I  really think  you're underestimating  the  number of
users happy with the  classic mode and who would not like  to go for a
compulsory  label-mode.  They  are  probably  not  reading  that  (too
extremist) discussion anymore, actually.

Best regards,
Jean-Christophe FILLIATRE
To unsubscribe, mail  Archives: