Seriously, can you justify a real world example where this cannot be replaced with a simpler concept?
Of course multiple inheritance CAN be replaced by decomposition and delegation -- for that matter you could do it all without method calls, or in COBOL -- the question is whether your code would end up being better as a result.
My contention is that controlled use of multiple inheritance is a reasonable technique for a developer to use, and more specifically that this implementation is a workable solution for cases where you'd like to extend an object through subclassing, and need the ability to use several subclasses at once.
The example I was using was from the real world -- Text::MicroMason. Using stackable mixins lets users select which features they want to enable, with relatively little overhead... If you see a better way to handle this, patches would be welcome.
In reply to Re^2: Stacking Mixin Classes at Run-time with Class::MixinFactory
by simonm
in thread Stacking Mixin Classes at Run-time with Class::MixinFactory
by simonm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |