Can we just have struct inheritence already?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Jun 9 19:47:26 UTC 2019


On 6/9/19 1:09 PM, KnightMare wrote:
> On Sunday, 9 June 2019 at 16:45:18 UTC, 12345swordy wrote:
> 
>> What is wrong with alias this?
> 
> in my mind "alias this" is a crutch that allow to move on, that tries to 
> replace "has-a" with "is-a" and at the same time introduces an implicit 
> conversion operator.

Sadly it was meant as a generalized "is-a". Implementation botched that, 
I'm afraid, beyond repair. We'd be better off deprecating it and 
allowing some simple form of subtyping for structs.



More information about the Digitalmars-d mailing list