What is the difference between a mixin and inheritance?
With multiple inheritance, new class may be composed from multiple superclasses. You can call only methods defined in any of superclasses.
On the other hand, mixin is an abstract subclass that may be used to specialize the beavior of a variety of parent classes. Mixins may call a method (for example sayHello(): String) even though they do not define such a method.
mixin M {
name: String
defmethod greetings() { print sayHello() + " " + name}
}
As you see, you can call sayHello() even though it is not defined anywhere. If you add the mixin M to class C, the C should provide the sayHello() method.