Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: Don Syme <dsyme@m...>
Subject: Re: Syntax for label

And why not "as", i.e. "t as x", as I explained once in a previous post.
I never did get an explanation as to why this wasn't an better solution.  It
reuses a rarely-used keyword in a perfectly backward-compatible way.  
I think it's simply a typical case of a new (and not necessarily terribly 
crucial) language feature muscling in on the limited "ultra-convenient" 
concrete syntax that's available!   No offence intended ;-)


-----Original Message-----
From: Christophe Raffalli []
Sent: 10 March 2000 18:45
Subject: Syntax for label

It is clear that labels are a good thing ...

But why did you use the same character ":" for types and labels !

whit not (for instance) x:t to say that x as type t
and                     l#x to say that x as label l

the syntax l#x:t is much better than l:x : t !!

I know that # is allready used for methods ... but some characters are
still usable:

£ it looks like the l of labels (but its ascii code is greater than 128,
but is this really a problem ? probably ?)

Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42