Multiple subtyping with alias this and nested classes

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Oct 5 17:15:35 PDT 2009


Yigal Chripun wrote:
>> I think 'alias this' is a powerful feature.
>>
>> Given the constraints like "easy for the compiler writer to implement"
>> and "we have many other things to do", I doubt traits or something
>> like that will be or needs to be in the language.
> 
> Alias this is powerful black magic. being powerful doesn't make it any 
> less dark.

So how does this work? Alias this was meant very clearly for allowing 
subtyping. Conversely, using it for subtyping is precisely how it was 
meant to be used. How exactly did you decide it was a hack or black 
magic or whatever?

Andrei



More information about the Digitalmars-d mailing list