Despite the undisputed prominence of inheritance as the fundamental reuse mechanism in object-oriented programming languages, the variants – single inheritance, multiple inheritance, and mixin inheritance – all suffer from conceptual and practical problems. Traits overcome the problems arising with the different variants of inheritance. Traits are essentially groups of methods that serve as bui...