A nice way to step into 2012
Jacob Carlborg
doob at me.com
Wed Dec 28 08:59:13 PST 2011
On 2011-12-28 13:54, bearophile wrote:
> Timon Gehr:
>
>> => expr
>>
>> should imo be a shorthand for
>>
>> () => expr.
>>
>> It saves some ((())(()))().
>
> It saves few (), but zero argument lambdas aren't that common in my functional-style code, and I think it decreases syntax uniformity and code readability. So I think it's a bad idea.
It can already be done with the lazy arguments.
void foo (lazy int a)
{
auto b = a();
}
int bar ();
foo(bar());
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list