Re:The Power of Lua and Mixins
by Udo on Sunday April 06, 2014 @08:58AM
(#7540781)
> Mixins are a useful mental model for some kinds of code reuse though.
They are, but I can think of at least one core feature-based solution to do the same thing with less overhead. Each mix-in or trait could easily be in its own table, to be joined with the object as it's being constructed in whatever fashion desirable.
They are, but I can think of at least one core feature-based solution to do the same thing with less overhead. Each mix-in or trait could easily be in its own table, to be joined with the object as it's being constructed in whatever fashion desirable.