Trait (computer programming): Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 1:
'''Trait''' is an [[abstract type]], used as a "simple conceptual model for structuring [[object oriented]] programs."[http://web.cecs.pdx.edu/~black/publications/TR_CSE_02-012.pdf]. Traits are similar to [[mixin]]s, but may include definitions for class methods. Traits have been proposed for inclusion in [[Smalltalk]], [[ActionScript|ActionScript 3.0]] and [[PHP]], and are found in Moose ([[Perl]] 5), [[Perl 6]], and [[Scala programming language|Scala]]. There's also a Traits module for [[Python]] [http://code.enthought.com/projects/traits/]. ''Module mixins'' in [[Ruby (programming language)|Ruby]] are similar to traits to some degree.
 
Traits were initially developed at the Software Composition Group, [[University of Berne]].