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

Larry Evans cppljevans at cos-internet.com
Sat Dec 2 14:55:17 PST 2006


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?



More information about the Digitalmars-d mailing list