"alias that this" or "alias this : that"

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Fri Feb 7 14:09:20 PST 2014


On Friday, 7 February 2014 at 07:36:57 UTC, Mike wrote:
> Can someone please clarify for me which of these is the 
> "preferred" syntax?
>
> alias that this;
> alias this : that;
>
> The documentation here (http://dlang.org/class.html#AliasThis) 
> doesn't mention the latter.  I'll do the unrewarding work of 
> updating the docs if someone could just please tell me which 
> syntax the core language folks prefer.
>
> Thanks.
> Mike
>
> For context:
> https://github.com/D-Programming-Language/dmd/pull/1413
> https://github.com/D-Programming-Language/dmd/pull/1685

I'd like for 'alias that this' to go away.

I'm fine with 'alias this = that'

If we must 'alias this : that' or "this implicitly casts to that" 
is also reasonable to me.

Yes 'alias that this' can stay for backwards compatibility.

No 'alias this : that' has not been implemented (that I'm aware 
of).


More information about the Digitalmars-d mailing list