Vote for func({expr}) over other ambiguous syntax

Sai leo303161 at yahoo.com
Tue Aug 22 14:33:07 PDT 2006


I vote for func({expr})
which is short form for func({ return expr;})

func(expr) is too ambiguous & confusing for good maintanance

Sai


kris wrote:
> Yes; would be nice to eliminate the return and the secondary ';' so it 
> looks like
> 
> # somefunk ({++i});
> #
> # rather than
> #
> # somefunk ({return ++i;});
> 
> Quite a difference, and both are still explicit rather than introducing 
> ambiguity. Or, use some kind of operator instead, like c# does?
> 
> # somefunk (=> ++i);
> 
> 



More information about the Digitalmars-d-announce mailing list