Traits is an abstract type, used as a "simple conceptual model for structuring object oriented programs."[1]. Traits are similar to mixins, but may include definitions for class methods. Traits has been proposed for inclusion in Smalltalk, ActionScript 3.0, and are found in Perl 6 and Scala. Module mixins in Ruby are similar to traits to some degree. An abstract type is a type in a nominative type system which is declared by the programmer, and which has the property that it contains no members which are not also members of some declared subtype. ... In computer science, object-oriented programming, OOP for short, is a computer programming paradigm. ... In object-oriented programming languages, a mixin is an approach to implementing classes that differs from the most widely-used approach coming from the programming language Simula. ... For other uses, see Small Talk (disambiguation). ... ActionScript is a scripting language based on ECMAScript, primarily used to develop software for the Adobe Flash . ... Perl 6 is a planned major revision to the Perl programming language. ... Scala is a multi-paradigm programming language designed to express common programming patterns in a concise, elegant, and type-safe way. ... Ruby is a reflective, dynamic, object-oriented programming language. ...
Traits were initially developed at the Software Composition Group, University of Bern.