From: Alder Green Date: 2006-06-10T04:43:46+09:00 Subject: Re: Why the lack of mixing-in support for Class methods? On 6/9/06, Joel VanderWerf wrote: > Here's another shortcut, dunno how original it is. I don't like the > #import (or #include!) suggestions because they take control away from > the module. In most cases, the module will know best which (if any) > class methods to contribute. Assuming #import would have a callback-hook like #included (#imported?), how would the locus of control shift from where it is right now? In a somewhat related note: Perhaps #import should call #include. Or maybe they would be entirely seperate: #import for module-level methods, #include for instance-level methods. Of course, this means that in the most common case you'd have the unDRYish idiom: import Fooable include Fooable But it's still much better than the mass of boilerplate code we need to paste there right now. Another suggestion: import Fooable, :include => false To import only the module level methods. I.e. :include => true by default. -- -Alder