Mixin Pros And Cons

Advantages

Mixin classes tend to be simple because they represent simple orthogonal concepts. The complexity of combining them is left to the compiler. It is left up to the compiler to generate fast, efficient, code, making heavy use of inlining.

OO programs often exploit dynamic polymorphism to achieve code reuse. For example the decorator design pattern [] is often used. A decorator object could apply a rotation of 90 degrees to the GUI control that it decorates. This approach is different to mixins in the following respects:

It is possible to get the best of both world using mixins on interface delegators.

Disadvantages

Mixins are a useful technique, but hardly a panacea. There are some significant disadvantages: