On Friday, 22 February 2013 at 21:23:04 UTC, Timon Gehr wrote:
I guess the main issue is that alias blah this; shouldn't have made it into the grammar in the first place. But this was obviously done in order to establish a broken analogy to the other uses of alias. Either alias this=blah; must be kept or the alias this syntax should be deprecated in favour of a specially named member function.

I believe the alias syntax was based on typedef, which was inherited from C, and has now been removed from D; so the justification was there in the past, but now absent which is why the change is happening now.

As far as replacing 'alias...this' with a member function, that's precisely how it *used* to be done with opDot(), but it suffered from overhead. I had thought, at the time 'alias...this' was first introduced, that the two were meant to live side by side, but then the realization came that one could actually achieve opDot's purpose with clever use of 'alias...this' so the latter fell out of favor. Alas.

Reply via email to