On Sunday, 10 February 2013 at 14:42:50 UTC, kenji hara wrote:
2013/2/10 kenji hara <[email protected]>
Why I argue that the syntax `alias this = sym;` is wrong?
Because:
Benefits of the proposed syntax are:
2a. It is consistent with class inheritance syntax `class C : B
{}`.
2b. It is scalable for multiple alias this feature, as like
`alias this
: sym1, sym2, ...;` .
2a. I agree.
2b. I always assumed multiple alias would be introduced like
this...
alias this = sym1;
alias this = sym2;
... which also is "needed" if you use a "3rd party library mixin"
in your struct(which internally uses alias this), so even with
the ':' syntax it's anyway required to support being able to use
it multiple times:
alias this : sym1;
alias this : sym2;
So I don't think 2b speaks in favor of the new syntax.