From: Daniel Brockman Date: 2005-07-29T11:00:47+09:00 Subject: Re: What's so special about operators, built-in classes and modules? Yukihiro Matsumoto writes: >> Mixin inheritance networks can come in the shape of any >> directed acyclic graph. > > If you treat classes and modules equally as graph nodes. You don't even have to involve classes. Just modules alone can form an inheritance network in the shape of any DAC. > But if you focus on classes, they form a simple tree, > with leaves (modules) attached to them. Agreed. Classes can only form trees. > Besides that, there's no diamond inheritance in > Mixin inheritance. This comes up again and again, and I never understand it. Two years ago, you claimed the same thing: > This combination is indeed a restricted multiple > inheritance. [Thanks to single class inheritance], > we won't have diamond inheritance problem, Mathieu Bouchard replied[1], >>> module A; end >>> module B; include A; end >>> module C; include A; end >>> class D; include C,B; end >>> >>> This is a diamond inheritance pattern. but you never replied back to him. I'd appreciate it if someone could clarify once and for all how the diamond inheritance problem doesn't exist in Ruby. -- Daniel Brockman [1]