Christophe Raffalli <Christophe.Raffalli@univ-savoie.fr> writes:
> Jacques Garrigue wrote:
> >
> > In this case, I suppose we should read `%' as `is'.
> >
>
> > Objective Caml version 2.99+10
> >
> > # List.map;;
> > - : fun%('a -> 'b) -> 'a list -> 'b list = <fun>
> > # List.map [1;2;3] fun%succ;;
> > - : int list = [2; 3; 4]
> > # let sub ?(%pos = 0) ?%len s =
> > let len = match len with Some x -> x | None -> String.length s - pos in
> > String.sub %pos %len s;;
> > val sub : ?pos%int -> ?len%int -> string -> string = <fun>
> >
>
> I really do think that it looks better !
I don't. % is a heavy character, only '#' and '@' are worse. '-' would
be far better, although this might break existing code. The natural
meaning is closest to "-" and ":". There is no relation to '%' or '#'.
Cheers,
Julian.
This archive was generated by hypermail 2b29 : Fri Mar 17 2000 - 10:04:46 MET