@property (again)

Kenji Hara k.hara.pg at gmail.com
Thu Nov 21 23:36:53 PST 2013


2013/11/22 deadalnix <deadalnix at gmail.com>

> On Friday, 22 November 2013 at 04:33:56 UTC, Kenji Hara wrote:
>
>> After removing 'function' concept, 'func' always means function pointer or
>> delegate. So we cannot call functions without parenthesis anymore. It is
>> unacceptable change to me, and many D programmers would probably argue
>> same
>> thing.
>>
>>
> It removes all ambiguities.
>
> Optional parentheses are still an option when they aren't ambiguous.
>
> void foo() {}
>
> foo; // Can still call foo if we want to.
>

It will introduce a new ambiguity. See below example.

int foo();
void test(int function() fp);
void test(int num);

void main() {
    test(foo);  // which test is called?
}

Kenji Hara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20131122/c46dc403/attachment.html>


More information about the Digitalmars-d mailing list