On Wednesday 02 February 2011 20:48:15 %u wrote: > When implemented, will uniform call syntax work for the "this" > object even if not specified? > > For example, will foo() get called in the following example? > > void foo(A a, int b) {} > > class A { > void test() { > this.foo(10); > foo(10); > } > }
I would think so, since I don't think that the this pointer/reference is treated in any special way. The only special thing about it as far as I know is that it's filled in for you in cases where you use member variables or call member functions without it. However, as UFCS has yet to be implemented, I'm not sure that we can be quite sure of how it's going to work. There are going to be a number of related features - such as alias this, opDispatch, and cases where there's a member function and a free function with the same name - which are going to have to be able to interact unambiguously, and I don't think that all of that has been entirely sorted out yet. - Jonathan M Davis