Question { 14234 }
What is a mixin class?
Answer
Mixin is a class that does not implement any method but are
in fact has only pure virtual methods. The implementor
decides the logic for these methods.
The term mixin were originally explored in the Lisp
language In C++, the term has been used to describe classes
in a particular (multiple) inheritance arrangement:
As superclasses of a single class that themselves have a
common virtual base
class .
We would like to specify an extension without pre-
determining what exactly it can extend. This is equivalent
to specifying a subclass while leaving its superclass as a
parameter to be determined later. The benefit is that a
single class can be used to express an incremental
extension, valid for a variety of classes.