On 03/03/2011 10:52 AM, kenji hara wrote:
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?
This is about Lua's solution on the topic (except there is no 'this' keyword,
the object's name is free.)
Denis
--
_________________
vita es estrany
spir.wikidot.com