Content deleted Content added
+cn |
Cybercobra (talk | contribs) ref |
||
Line 1:
In [[computer programming]], a '''trait''' is an [[abstract type]], used as a "simple conceptual model for structuring [[object oriented]] programs".<ref>http://web.cecs.pdx.edu/~black/publications/TR_CSE_02-012.pdf</ref> Traits are similar to [[mixin]]s, but may include definitions for class methods. Traits have been proposed for inclusion in [[Smalltalk]], [[PHP]], and [[ActionScript|ActionScript 3.0]], and are found in [[Moose (Perl)|Moose]] ([[Perl]] 5), [[Perl 6]], [[Joose (framework)|Joose]] ([[JavaScript]]), and [[Scala programming language|Scala]]. ''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]]
== External links ==
|