Multiple alias this, what's the hold up?

Mike Franklin slavo5150 at yahoo.com
Sun Jun 16 09:33:02 UTC 2019


On Sunday, 16 June 2019 at 06:08:54 UTC, Walter Bright wrote:

> Multiple alias this is multiple inheritance. Generally, if you 
> find yourself wanting multiple inheritance, it's likely time to 
> rethink the data structures.

If one should prefer composition to inheritance the language must 
provide the proper facilities to make composition just as 
convenient.

I refer you to this StackOverflow question 
(https://stackoverflow.com/questions/255553/is-it-possible-to-implement-mixins-in-c) where a C# user was looking for a convenient way to reuse and aggregate implementations.  The second comment to the question says it all:

> I find it annoying that C++ experts make statements like 
> "Prefer composition to inheritance" yet the language (C++ or 
> C#) offers precious little help to do the "right thing".

Mike


More information about the Digitalmars-d mailing list