On 1/24/2013 10:17 AM, Andrei Alexandrescu wrote:
On 1/24/13 12:15 PM, Peter Alexander wrote:
On Thursday, 24 January 2013 at 16:29:07 UTC, Andrei Alexandrescu wrote:
On 1/24/13 3:57 AM, Jacob Carlborg wrote:
void delegate () foo ();

foo() // would call the delegate ?

Yes.

a = foo; // fetch the delegate
b = foo(); // fetch and invoke the delegate

How about generic code?

void callFunc(alias f, Args...)(Args args)
{
f(args);
}

void delegate() foo();
void delegate(int) bar(int x);

callFunc!foo(); // calls delegate?
callFunc!bar(0); // calls bar?

Seems like a recipe for disaster.

Agreed. This is a good litmus test. One option we had in mind was to still keep
@property for disambiguating such cases.

Another option is f(args) always requires parens, even if args expands to 0 
args.

Reply via email to