On 12/09/2014 07:48, eles wrote:
On Thursday, 11 September 2014 at 23:05:19 UTC, Ali Çehreli wrote:
On 09/11/2014 12:08 PM, eles wrote:
The 'alias this = A' syntax did appear for one release as an
unintentional feature:
Having two syntaxes for alias makes everything looking worse and is an
unnecessary noise.
'alias this' is different from normal aliasing. The 'alias ... this'
syntax should be replaced, but we haven't agreed on by what. I think
Timon Gehr's opThis solution is best:
http://forum.dlang.org/thread/[email protected]?page=2#post-ld5c9r:2418lt:241:40digitalmars.com
Using the opThis identifier (or similar) avoids having to introduce a
separate 'get' property function when you need to add const qualifiers
to the forwarded symbol, or do some processing first.
P.S. As I noted in that thread, the suggested syntax for forwarding
constructors is not so ambiguous, it should be:
class D : C {
alias this = super.this; // note .this to name base ctor
}