Trait (computer programming)

This is an old revision of this page, as edited by 213.115.53.133 (talk) at 08:13, 22 May 2007 (General edits, correct spelling). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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.

Traits were initially developed at the Software Composition Group, University of Bern.