Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: Syntax for label
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Julian Assange <proff@i...>
Subject: Re: Syntax for label, NEW PROPOSAL
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.