Possible enhancement: Concise return statements

Mehrdad wfunction at hotmail.com
Mon Aug 15 07:02:31 PDT 2011


On 8/15/2011 3:54 AM, Timon Gehr wrote:
> Currently, when using delegates in D, there is 'return' all over the 
> place.
> Eg:
> map!((a){return a*foo(a);})(arr);
>
> Many delegates consist of only one return statement. Writing 'return' 
> is rather inconvenient and adds to the general noise

This is precisely the reason for C#'s  a => b notation. Maybe it's time 
to adopt it?


More information about the Digitalmars-d mailing list