Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: [Caml-list] Future of labels
Hello Judicael,

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

I asked for this pragma one year ago, but was refused it :-)
This should come from the users, they said.

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

So bad you didn't say it one year ago :-(
In ocaml-2.99, this was the case, but I had to remove labels on find
and remove against my will :-)

Remark that this might suggest yet another evolution:
keep classic and label mode as they are now, but add more labels in
the standard library (revert back to the old labels ?)

Jacques

P.S. It's friday night here, so I'll join back the discussion on
monday.
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr