From: transfire@... Date: 2006-06-15T04:59:18+09:00 Subject: Re: Why the lack of mixing-in support for Class methods? Joel VanderWerf wrote: > transfire@gmail.com wrote: > > Joel VanderWerf wrote: > > > >> Why should the order of calling extend and adding methods matter? It > >> doesn't seem to in this example, but this is much simpler than > >> class_extension: > > > > It's a little more subtle than that, because it has to do with modules > > included in modules. > > Yes, I see your point. Two questions: > > 1. Are chained inclusions of modules a good way to propagate class > methods? (Do we really need this feature, for good design?) Yes, b/c if you don't you won't be able to propogate data/control through the hierarcy. i.e. calling #super. > 2. Do we really want the modules to respond to the class methods that > they provide to classes? (I think that's the way your class_extension > works, but in my own test implementation I avoided that.) In some cases one will, so it important to have the ability. In contrast, I could not think of any benefit of not having the modules respond, nor any adverse effect from having them always respond. So I'd say yes here as well. Make sense? T.