From: dblack@... Date: 2006-06-09T23:18:50+09:00 Subject: Re: Why the lack of mixing-in support for Class methods? Hi -- On Fri, 9 Jun 2006, James Edward Gray II wrote: > On Jun 9, 2006, at 5:58 AM, dblack@wobblini.net wrote: > >> Then again, I'm not sure what's wrong with >> "extend", so I'm probably a bit out of the loop on this discussion. > > Well, extend takes the instance methods of a module and makes them class > methods on the receiver. People are asking for a natural way to mix in the > class methods of a module, preferably while mixing in the instance methods as > well (as include currently does). In short, they want to turn this idiom > into a one liner: I know (believe me, I've been through many iterations of this discussion :-) What I really mean is: I don't see what's wrong with: module SomeMethodsIWantSomeClassesToHave end module SomeInstanceMethods end class C extend SomeMethodsIWantSomeClassesToHave include InstanceMethods end In other words, I prefer a module design that doesn't fuse different modularities together in the first place. David -- David A. Black (dblack@wobblini.net) * Ruby Power and Light, LLC (http://www.rubypowerandlight.com) > Ruby and Rails consultancy and training * Author of "Ruby for Rails" from Manning Publications! > http://www.manning.com/black