From: Daniel Berger Date: 2007-10-16T06:58:09+09:00 Subject: Re: RubyTraits 0.1 On Oct 15, 2:33 pm, Trans wrote: > The significant difference between this and your #use method is that > #use can more easily add a small select group of methods from a module > --I think that's that gist of your lib. However, if you find yourself > "cherry picking" methods from a module like that, it's time to rethink > the design. Plus, implementation of that is terribly inefficient > (having to remove all other methods). > > At any rate, Traits are much prettier: > > class X > include W - :y > end I think excluding specific methods would be unusual in practice. Of course, I'm of the opinion that traits are a solution in search of a problem to begin with, so take my opinions with a grain of salt. Anyway, I suppose I could add an option where it simply discards dup's dynamically when a module is included: class X use ModA, :no_override end That would be interpreted as "include all methods unless already defined". Regards, Dan