From: Joel VanderWerf Date: 2001-10-09T14:20:09+09:00 Subject: [ruby-talk:22280] Re: Ruby and multiple inheritance ts wrote: > > >>>>> "J" == Joel VanderWerf writes: > > J> Base#foo called in this way cannot affect the instance vars of Derived. > > I can't understand why a module must affect an instance variable which > will be defined in a class which include this module. Bad design for me. Ok, maybe that's a bad example. But it applies to instance methods as much as to instance variables. That's a real problem, since the concept of mixin (like Enumerable) depends on the module being able to call instance methods (like each) that will be defined in a class which mixes in the module. My point is that "M.foo" (where M is an included module) ishould not be looked at as a generalization of "super" that lets you specify which included module to use, in the style of C++. As someone wisely pointed out, mixin is a different beast from MI, neither bigger nor smaller, but equally hairy. This is a good reason to avoid name conflicts between mixins. -- Joel VanderWerf California PATH, UC Berkeley mailto:vjoel@path.berkeley.edu Ph. (510) 231-9446 http://www.path.berkeley.edu FAX (510) 231-9512