
Inheritance is well-known and accepted as a mechanism for reuse in object-oriented languages. Unfortunately, due to the coarse granularity of inheritance, it may be difficult to decompose an application into an optimal class hierarchy that maximizes software reuse. Existing schemes based on single inheritance, multiple inheritance, or mixins, all pose numerous problems for reuse. To overcome these problems we propose traits , pure units of reuse consisting only of methods. We develop a formal model of traits that establishes how traits can be composed, either to form other traits, or to form classes. We also outline an experimental validation in which we apply traits to refactor a nontrivial application into composable units.
Multiple Inheritance, Inheritance, D.3.3 [Programming Languages]: Language Constructs and Features-Classes and objects inheritance, Mixins, Informatique appliquée logiciel, Reuse, Traits, D.3.3 [Programming Languages]: Language Constructs and Features-Classes and objects, D.2.7 [Software Engineering]: Distribution and Maintenance-Restructuring Inheritance Mixins Multiple Inheritance Traits Reuse Smalltalk, [INFO.INFO-CL] Computer Science [cs]/Computation and Language [cs.CL], D.2.7 [Software Engineering]: Distribution and Maintenance-Restructuring Inheritance, Languages, inheritance, Smalltalk, Multiple inheritance
Multiple Inheritance, Inheritance, D.3.3 [Programming Languages]: Language Constructs and Features-Classes and objects inheritance, Mixins, Informatique appliquée logiciel, Reuse, Traits, D.3.3 [Programming Languages]: Language Constructs and Features-Classes and objects, D.2.7 [Software Engineering]: Distribution and Maintenance-Restructuring Inheritance Mixins Multiple Inheritance Traits Reuse Smalltalk, [INFO.INFO-CL] Computer Science [cs]/Computation and Language [cs.CL], D.2.7 [Software Engineering]: Distribution and Maintenance-Restructuring Inheritance, Languages, inheritance, Smalltalk, Multiple inheritance
| selected citations These citations are derived from selected sources. This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | 161 | |
| popularity This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network. | Top 10% | |
| influence This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | Top 1% | |
| impulse This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network. | Top 1% |
