Uniform Function Call Syntax(UFCS) and @property
kenji hara
k.hara.pg at gmail.com
Mon Mar 7 15:53:27 PST 2011
Additional point in my opinion:
Calling UFCS-able annotated function by normal function call syntax is
still vaild.
But not annotatied function shouldn't be allowed with member-like call syntax.
void f(T)(T this, int n){...} // UFCS annotated
void g(T)(T x, int n){...} // do not UFCS annotated
struct Foo{}
Foo foo;
foo.f(10); // member-like syntax - ok
f(foo, 10); // normal call syntax - still ok - UNIFIED function call syntax.
//foo.g(10); // Invalid
g(foo, 10); // normal call syntax - ok
Kenji
More information about the Digitalmars-d
mailing list