Suggestion: Walter Bright, why not to implement multiple inheritance in D?

Kyle Furlong kylefurlong at gmail.com
Sat Dec 2 17:35:24 PST 2006


Larry Evans wrote:
> On 12/02/2006 09:27 AM, Burton Radons wrote:
> [snip]
>> I don't have a perfect solution to the problem; there is none because 
>> it's asking two objects to exist in one space and we need to resolve 
>> that. But given that multiple inheritance is sometimes necessary, 
>> waving it off as "too complex" or "bad form" is impractical; like any 
>> type of suppression, that only leads to cracking and nasty leaks 
>> (mixins).
>>
>> I have an idea. Let's try making this assertion: no type will have in 
>> its inheritance tree another type multiple times without being an 
>> abuse of multiple inheritance. Given this statement, can anyone find an 
> [snip]
>> Yeah, but C++ programmers are programming in C++. The hell do they 
>> know about good language practices? ;-)
> 
> How would the D equivalent to mpl::inherit_linearly<, inherit<,>, >
> (see http://www.boost.org/libs/mpl/doc/refmanual/inherit-linearly.html)
> work without using the MI class, inherit?

God, Boost makes me want to stab my eyes out.



More information about the Digitalmars-d mailing list