[nem-en] Parentheses

Maurizio Colucci seguso.forever at tin.it
Wed Sep 8 09:35:41 CEST 2004


Hello,

With the ongoing update to the type inference (I read the Monologue :-)), the 
only thing that is holding me back from using Nemerle (instead of ocaml) is 
the heavy notation with too many parentheses, especially for lambdas: 

Nemerle:

List.Map ([B()], fun (x) { x.foo });

Ocaml:

List.map [new B]  (fun x -> x#foo)

I understand the syntax is meant to be similar to C#, but this should be taken 
into consideration. Does nobody feel this as a problem?

IMHO the problem would be easily fixed by allowing this alternative syntax for 
lambdas (in addition to the current one):

List.Map ([B()], fun x -> x.foo );

Would this be possible?

PS: Even better would be:

List.Map [B()]  (fun x -> x.foo);

but I understand this would make too much of a change.

PPS: And what about removing () from B()?

Thanks for your kind answers :-)
-- 
Maurizio Colucci
http://logicaldesktop.sourceforge.net




More information about the devel-en mailing list