Trait (abstract type)
From Wikipedia, the free encyclopedia
Trait 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 have been proposed for inclusion in Smalltalk, ActionScript 3.0 and PHP, and are found in Moose (Perl 5), Perl 6, and Scala. Module mixins in Ruby are similar to traits to some degree.
Traits were initially developed at the Software Composition Group, University of Berne.