Multiple alias this, what's the hold up?

Walter Bright newshound2 at digitalmars.com
Sun Jun 16 22:14:19 UTC 2019


On 6/16/2019 7:39 AM, Timon Gehr wrote:
> On 16.06.19 08:08, Walter Bright wrote:
>> Multiple alias this is multiple inheritance.
> 
> No. It's multiple imports.

D already has multiple imports with template mixins. If multiple imports is what 
people want, it's already there.


>> Generally, if you find yourself wanting multiple inheritance, it's likely time 
>> to rethink the data structures.
> 
> Only if your programming language gets MI wrong. C++ gets MI wrong. This is how 
> to do multiple inheritance: https://www.eiffel.org/doc/eiffel/ET-_Inheritance
> 
> (Ignore the section about covariance. Eiffel gets that part totally wrong.)

Designing a decent object is hard enough, and most everybody (including me) do a 
lousy job of it. When people start using MI, the mess becomes incredible. Maybe 
in another 20 years ago I'll get good enough to be able to write a sensible MI 
object.



More information about the Digitalmars-d mailing list