From: Yukihiro Matsumoto Date: 2005-07-29T13:54:17+09:00 Subject: Re: What's so special about operators, built-in classes and modules? Hi, In message "Re: What's so special about operators, built-in classes and modules?" on Fri, 29 Jul 2005 11:00:47 +0900, Daniel Brockman writes: |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. The relationship figure should be the following: Object | A-C | B-A \|/ D I want to mixin behave more like traits. The precedence should be [D, C, A, B, A, Object] in the future. This is a drawback I mentioned in [ruby-talk:149778]: >I know there's some drawbacks in the current implementation of Ruby's >mixin inheritance, when a module is included repeatedly. I am willing >to fix it. I'm seeking the best way to fix. Since repeated mixin inclusion is pretty rare case, this problem have been there for long time. matz.