digitalmars.D - Uniform Function Call Syntax(UFCS) and property
- kenji hara (14/14) Mar 03 2011 The two semantics have no relation with each other.
The two semantics have no relation with each other. My idea is that we allow 'this' keyword as the first parameter of free function: ---- T t; void method(T)(ref T this){...} --> t.method(); void method(T, A...)(ref T this, A args){...} --> t.method(arg1, arg2); property bool empty(T)(ref T this){...} --> if (t.empty){...} property void empty(T)(ref T this, bool f){...} --> t.empty = true; ---- Do you think?
Mar 03 2011