Can we just have struct inheritence already?

KnightMare black80 at bk.ru
Sun Jun 9 17:09:44 UTC 2019


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. last one can be 
alone: decimal to double with no inheritance.

in your my its cool thing and "let me sign your cast".

well, just two different points of view at one thing.
BUT in case where I want "is-a" from one type and implicit cast 
to another my point became more correct. BUT I can't think of an 
example right now, maybe no such example at all. BUT I still has 
more control in my hands with is-a/has-a and implicit opCast(if 
it will be added).


More information about the Digitalmars-d mailing list