Browse thread
RE: [Caml-list] Future of labels
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Judicael Courant <Judicael.Courant@l...> |
| Subject: | Re: [Caml-list] Future of labels |
Jacques Garrigue a écrit : > Sorry for Judicael, but I see no way to satisfy everybody with a single > mode. (You don't expect me to just drop the label mode, and be happy > with classic, no ?) > No I can't. But I did neither expect you to remove labels from the standard library: this would be just another way to drop labels, would not it? :-) > On the other hand Manuel expresses an opinion I've heard a few times: > moving to label mode might be nice, if the price to pay was not so > high. I agree with this statement and that's why I would have prefered a single mode: my problem is that with two modes I cannot say "ok, I am just giving a try to the modern style within this function/this file" mostly because I have to choose classic vs modern for a whole file and even for a whole project (as I do not want my Makefile to become a nightmare because of labels). Unfortunately it appears there is no mode that is "better" than both the current classic *and* modern ones. So we need two modes. Then, I am not opposed to have labels as the default mode (classic being kept only for backward compatibility). However I wish there would be a way to switch to this classic mode with a pragma (not only with a command-line switch) so that it is easier to mix files in classic mode and in modern mode in a given project (and if it is even possible, to mix functions written in classic modes and in modern mode within a given file). That would help moving eventually to modern mode. IMHO "There's More Than One Way To Do It" is not necessarily a good slogan... If I switch to labels, I would prefer changes to happen once. If you remove labels from the standard library and leave them in third parties libraries, either people won't use third-parties libraries (which would be a pity) or they will come back later saying "labels are great! why does the standard library lacks labels?". I would prefer the standard library to have labels at the right places. IMHO there are still possible improvements with respect to this issue. For instance in Map you can find val add : key:key -> data:'a -> 'a t -> 'a t val find : key -> 'a t -> 'a val remove : key -> 'a t -> 'a t which is not really uniform (moreover, I never remember whether it is find : key -> 'a t -> 'a or find : 'a t -> key -> 'a so I would like to have find : key:key -> 'a t -> 'a) Judicaël. -- Judicael.Courant@lri.fr, http://www.lri.fr/~jcourant/ (+33) (0)1 69 15 64 85 ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr