caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
To: Xavier.Leroy@inria.fr
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Future of labels, and ideas for library labelling
Date: Tue, 03 Apr 2001 18:54:48 +0900	[thread overview]
Message-ID: <20010403185448J.garrigue@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: <20010403105212.A15700@pauillac.inria.fr>

Salut Xavier,

I'm a bit surprised by your post. Yes this discussion is lively.
But it is calm, and we just try to find the Right Way. I'm not sure it
was the case last year, so I wouldn't discard this discussion as
useless.

> 1- We wanted labeled and optional function arguments to be an
> extension of the Caml language (just like objects, classes, and
> modules to a very large extent), i.e. something that does not affect
> the core ML language, and remain backward compatible with earlier
> versions of OCaml.  I think this is crucial for two reasons.  First,
> it must be possible to learn and teach OCaml incrementally, by
> successive layers of increasing complexity.  Second, we happen to have
> users that develop significant applications in OCaml, and changing the
> language in incompatible ways every other year is a sure way to piss
> them off.  We get enough criticism and suspicion about OCaml "changing
> all the time"...

This doesn't dispense us of trying to find a good solution.
Last year's change was 100% compatible, but I think that during our
discussions before the release we also talked of non 100% compatible
approaches. The real question is to make the cost of transition
neglectible, isn't it? And not to have to change again.

> 2- With the strict label semantics of OLabl or OCaml with the -labels
> option (if a label is given in the function definition/declaration, it
> must be used in all applications of that function), the only way to
> achieve backward compatibility (point 1 above) is to have versions of
> the standard libraries that are totally unlabeled.  Otherwise,
> long-time Caml users would have to change every call to List.map in
> their code, and teachers would have to teach labels very early.
> 
> Of course, having standard libraries completely unlabeled kind of
> defeats the purpose of labels (i.e. self-documentation of library
> functions and additional safety and flexibility at applications of
> these functions), so Jacques' initial proposal was to have two
> versions of the standard libraries, one with labels and one without.
> But we quickly realized this was unfeasible.  It's just too hard to
> maintain two versions of the same libraries.  And everyone who writes
> a Caml library and wants it to be used as widely as possible while
> taking advantage of labels would also need to maintain two versions.

I made some proposals to make the differences small enough that this
would be easy to maintain.
One important trouble yet is where is the limit between standard
libraries and other libraries.

> 3- Thus the "classic mode" was born as a way to have only one
> (labeled) interface to a library, yet not force users of this library
> to use labels at applications.  I really liked this idea of Jacques,
> because we can put labels in the library interface to self-document
> it, yet remain backward compatible with code using the library without
> labels.  Of course, users that want the additional safety of labels
> can provide them at application sites, where they will be checked by
> the type-checker.  To me, this is an excellent compromise: while I
> usually don't put labels at application sites, I enjoy the additional
> documentation provided by labels in module interfaces.

I sincerly hoped this would work.  Unfortunately, I see not very much
enthusiasm for the classic mode.

> 4- Since we did not want to trash the OLabl approach immediately, the
> "commuting label mode" was introduced

Huh, strange view of history.

> A year or so later, I'm still convinced this design is the most
> reasonable approach.  Yes, having two modes is not nice, but it is a
> lot less bad than the alternatives.  If one mode must go, I think it's
> the "commuting label" mode because of the backward compatibility issue
> (point 1) and the fact that multiple versions of the libraries are
> infeasible (point 2). 

I understand perfectly well point 1 (to a certain extent), but I'm not
so sure point 2 is really a problem if we are not too ambitious.

> So, the real questions I have for readers of this list:
> 
> - How many of you use the "commuting labels" mode?
I do. But I don't like votes.
> - For those who use it, do you take advantage of commutation or
>   do you use it mostly to benefit from strict checking of labeled
>   arguments?
Both, of course.
> - What is worse in your opinion: having two modes or removing the
>   "commuting label" mode?
I do not see where this alternative comes from.
Classic mode was designed as an interaction mode with label mode.
I wouldn't consider it very interesting on its own. (That's maybe its
main drawback)

Apologies for the short tempered reaction.

Jacques Garrigue
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


  parent reply	other threads:[~2001-04-03  9:52 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-31  3:40 [Caml-list] Future of labels Yaron M. Minsky
2001-04-02  3:39 ` [Caml-list] Future of labels, and ideas for library labelling Jacques Garrigue
2001-04-02  7:58   ` Judicael Courant
2001-04-02  8:50     ` Markus Mottl
2001-04-02 10:33     ` kahl
2001-04-03  0:35       ` Jacques Garrigue
2001-04-03  1:36         ` Kipton M Barros
2001-04-03  1:52         ` Patrick M Doane
2001-04-03  3:53           ` Jacques Garrigue
2001-04-03  5:10             ` Patrick M Doane
2001-04-03  9:30               ` Jacques Garrigue
2001-04-03  8:52             ` Xavier Leroy
2001-04-03  9:34               ` Judicael Courant
2001-04-03  9:54               ` Jacques Garrigue [this message]
2001-04-03 12:59                 ` Jean-Christophe Filliatre
2001-04-03 13:11                   ` [Caml-list] ocaml, java, rmi and jini Martin Berger
2001-04-03 19:23                     ` Chris Hecker
2001-04-03 20:50                       ` Gerd Stolpmann
2001-04-06  9:40                         ` Sven LUTHER
2001-04-06 20:57                           ` Gerd Stolpmann
2001-04-03 21:06                       ` martinb
2001-04-06 15:03                     ` Xavier Leroy
2001-04-03 14:06                   ` [Caml-list] Future of labels, and ideas for library labelling Jacques Garrigue
2001-04-03 14:12                     ` Daniel de Rauglaudre
2001-04-03 14:42                       ` Claude Marche
2001-04-04 19:18                     ` Gerd Stolpmann
2001-04-03  9:55               ` Ohad Rodeh
2001-04-03 18:06                 ` [Caml-list] Example of Ocaml-syntax problem with ; Mattias Waldau
2001-04-04 15:15                 ` [Caml-list] Suspending threads Ohad Rodeh
2001-04-04 17:28                   ` Vitaly Lugovsky
2001-04-06 13:21                   ` Xavier Leroy
2001-04-03 12:02               ` [Caml-list] Future of labels, and ideas for library labelling Dave Mason
2001-04-03 13:43               ` Francois-Rene Rideau
2001-04-03 14:23                 ` Daniel de Rauglaudre
2001-04-03 13:43               ` Frank Atanassow
2001-04-03 13:58               ` Joshua D. Guttman
2001-04-03 16:52               ` Eric C. Cooper
2001-04-09  9:05                 ` John Max Skaller
2001-04-09  7:29             ` John Max Skaller
2001-04-03  8:07         ` Judicael Courant
2001-04-03  6:55     ` Chris Hecker
2001-04-03 18:13       ` [Caml-list] Generics? Brian Rogoff
2001-04-03 20:12         ` Chris Hecker
2001-04-10 16:48           ` John Max Skaller
2001-04-09  8:11       ` [Caml-list] Future of labels, and ideas for library labelling John Max Skaller
2001-04-09  9:21         ` Jacques Garrigue
2001-04-09 15:06           ` Fergus Henderson
2001-04-10 18:49           ` John Max Skaller
2001-04-09 19:54         ` Chris Hecker
2001-04-10  3:37           ` Jacques Garrigue
2001-04-10  7:42             ` Judicael Courant
2001-04-10  8:25               ` Jacques Garrigue
2001-04-10  8:46               ` Claude Marche
2001-04-10 10:09                 ` Jacques Garrigue
2001-04-10 14:42                   ` Lionnel Maugis
2001-04-10  9:06             ` François-René Rideau
2001-04-11 15:34               ` Jacques Garrigue
2001-04-11 17:48                 ` Dave Mason
2001-04-12 12:39                 ` [Caml-list] How do I define prog1? Mattias Waldau
2001-04-12 14:22                   ` Vitaly Lugovsky
2001-04-12 17:53                     ` William Chesters
2001-04-12 15:15                   ` Sven LUTHER
2001-04-12 16:14                     ` Mattias Waldau
2001-04-12 15:21                   ` Maxence Guesdon
2001-04-12 15:47                   ` Stefan Monnier
2001-04-17 20:04                     ` Chris Hecker
2001-04-10 22:43             ` [Caml-list] Future of labels, and ideas for library labelling Brian Rogoff
2001-04-11  8:29               ` Jacques Garrigue
2001-04-11  9:44                 ` Anton Moscal
2001-04-11 13:16                 ` Didier Remy
2001-04-11 15:11                   ` Jacques Garrigue
2001-04-03  7:27 Arturo Borquez
2001-04-03 16:39 John R Harrison
2001-04-04 16:37 Dave Berry
2001-04-11 10:48 Francois-Rene Rideau
2001-04-17 11:53 Poigné

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=20010403185448J.garrigue@kurims.kyoto-u.ac.jp \
    --to=garrigue@kurims.kyoto-u.ac.jp \
    --cc=Xavier.Leroy@inria.fr \
    --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;
as well as URLs for NNTP newsgroup(s).