On Fri, Feb 17, 2012 at 17:36, trans <transfire / gmail.com> wrote: > Some time ago, I suggested that it might be worth considering a design where > Ruby classes remain free of any direct method definitions, and instead act > only as containers for mixins. And that any method defined directly on the > class syntactically would in actuality be added to a pre-class anonymous > mixin under the hood. > > I bring this up again, not only because I think it's worth considering, but > also I recently realized an experimental implmentation of it has already > been created by Loren Segal called `metamorph`. > > https://github.com/lsegal/metamorph > > Though certainly not a complete or optimized implementation, it is something > that can be tried out. > > The advantages of this idea include: > > * Simpler conceptual model, i.e. -- classes are just module containers. > * Classes and modules become truly distinct --no more `class Class < > Module`. > * Better control of mixin order, including easily implemented "prepend" > functionality. How does this give you better control of mixin order? The only thing this changes is that #include will behave like the proposed #prepend; there's no way to get the previous #include-functionality.