From: Travis D Warlick Jr Date: 2007-07-14T11:41:01+09:00 Subject: Re: Inheritable mixin TRANS wrote: > Concept for Ruby 2.0... > > What do you think of making Class not inherit Module, but instead make > them separate classes that both mixin "Inheritable" (or whatever you'd > like to call it)? I agree. Class extends Module is incorrect by definition. For Class to extend Module requires that a Class "is a" Module, which is false. I thought about the include relationship... class Class include Module end however, this could end up as an implementation nightmare seeing that Class would first have to implement the include method and the related methods (include?, included, etc) and possibly more. > There are a few cases where a method belonging in Module doesn't > belong in Class, so thats' at least one indication that the current > relationship isn't quite right. A mixin seems like the right fit. In a > sense, the mixin would be to the class-level as Kernel is to the > instance-level. Good solution. I concur. However, we need input from the gurus. -- Travis Warlick "Programming in Java is like dealing with your mom -- it's kind, forgiving, and gently chastising. Programming in C++ is like dealing with a disgruntled girlfriend -- it's cold, unforgiving, and doesn't tell you what you've done wrong."