From: ara.t.howard@... Date: 2006-06-08T21:57:27+09:00 Subject: Re: Why the lack of mixing-in support for Class methods? On Thu, 8 Jun 2006, Alder Green wrote: > Hi > > I'm confused as to why class methods aren't include'd by default along > with instance methods when mixing-in modules. > > It obstructs the important orthoganility between modules and classes, > and - among other problems - thus undermines the position of mixins as > an alternative to class-based multiple inheritance. > > In short, I can see a lot of poor consequence to that lack of support, > while on the other hand no good reason for it. Maybe someone would > care to elighten me? > > (I'm aware of the various hacks for fudging such support, and in fact > use some of them in my code. But there are readability and > maintainability issues with those hacks for something that's supposed > to be a core feature). > > -- > -Alder module M def self.new 'yikes!' end def self.alloc 'even worse' end def self.name 'this is getting bad' end def self.is_a? 'i hope you did not override this' end end class C include M end -a -- suffering increases your inner strength. also, the wishing for suffering makes the suffering disappear. - h.h. the 14th dali lama