Scala – change class’s functionality on the fly with trait

The very interesting feature of traits is possibility is dynamic mixin with other object. Why I’ve named it „dynamic”?. Because you can add trait not only to class but also to instance. It’s powerful feature that can change functionality of a class on the fly. […]