Traits Paper

Traits are a proposed feature for SmalltalkLanguage, and are explained here: http://www.iam.unibe.ch/~scg/Research/Traits/

The famous TraitsPaper [http://web.cecs.pdx.edu/~black/publications/TR_CSE_02-012.pdf] explains why this is better than MultipleInheritance, MixIns, and SingleInheritance.

They're basically little modules that can be composed into classes to increase modularity and reusability, but without the quirks usually associated with mixins.

Incidentally, they will appear in Perl6 (and are available for Perl5 as 'roles' implemented in the CPAN module Moose [http://search.cpan.org/dist/Moose/]), are already in ScalaLanguage, can see some light in EiffelLanguage, and are similar to RubyLanguage's mixins.

Could someone clarify the relationships of these "traits" to the "traits object" model present in SelfLanguage? Smells awfully similar...

There are also TraitsTemplates in CeePlusPlus, with application in BoostTypeTraits.


CategoryExternalLink CategoryPaper


EditText of this page (last edited November 16, 2010) or FindPage with title or text search