English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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 (15:50)
From: Claude Marche <Claude.Marche@l...>
Subject: Re: [Caml-list] Future of labels, and ideas for library labelling
>>>>> "Daniel" == Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr> writes:

    Daniel> May I ask a question? What is exactly the problem of having just one mode:
    Daniel> labels being optional *and* commutation mode? What is the problem, exactly?

    Daniel> 1. if there are no labels, then the order is the order
    Daniel> 2. if there are labels, then the parameters are indicated by the labels

    Daniel> Where is the problem? Could you give us examples?

Dear all,

As Daniel, I do not understand where the problem is. My naive
understanding is the following: 

- either a function is defined without labelled arguments, and when
  calling it you have to provide arguments in the right order, and you
  may have a partial application if you don't provide all of them.

- or this function is defined with labelled arguments, possibly with
  default values like in LablTk, and for calling it you may provide
  the arguments in the order you like, omitting optional arguments if
  you like. And such a function call would be always considered
  non-partial, so that if you really want some kind of partial
  application then you have to eta-expand your function call.

Isn't this feasible? Isn't this enough for all purposes? If not,
does anybody could show a concrete example where this would not be

If we need to vote, I vote for any solution that would keep future
ocaml versions compatible with 3.00. I do not want to use labels in
functions I write, but I don't mind to use labels for calling library
functions if the author as decided to use labels, like LablTk. And for
the standard library, I would really prefer to have no labels, I don't
see at all what we gain to have such labels ~f in List functionals.

| Claude Marché           | mailto:Claude.Marche@lri.fr |
| LRI - Bât. 490          | http://www.lri.fr/~marche/  |
| Université de Paris-Sud | phoneto: +33 1 69 15 64 85  |
| F-91405 ORSAY Cedex     | faxto: +33 1 69 15 65 86    |
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr