N. Schärli, S. Ducasse, O. Nierstrasz, and A. Black. ECOOP 2003 -- Object-Oriented Programming, volume 2743/2003 of Lecture Notes in Computer Science, page 327--339. OGI School of Science & Engineering , Oregon Health and Science University, Springer, (November 2003)
DOI: 10.1007/b11832
Abstract
Inheritance is the fundamental reuse mechanism in object-oriented programming languages; its most prominent variants are single inheritance, multiple inheritance, and mixin inheritance. In the first part of this paper, we identify and illustrate the conceptual and practical reusability problems that arise with these forms of inheritance. We then present a simple compositional model for structuring object-oriented programs, which we call traits. Traits are essentially groups of methods that serve as building blocks for classes and are primitive units of code reuse. In this model, classes are composed from a set of traits by specifying glue code that connects the traits together and accesses the necessary state. We demonstrate how traits overcome the problems arising with the different variants of inheritance, we discuss how traits can be implemented effectively, and we summarize our experience applying traits to refactor an existing class hierarchy.
OGI School of Science & Engineering , Oregon Health and Science University
pages
327--339
publisher
Springer
series
Lecture Notes in Computer Science
volume
2743/2003
citeulike-article-id
3123
citeseerurl
http://citeseer.ist.psu.edu/566972.html
file
TR_CSE_02-012.pdf:Traits\\TR_CSE_02-012.pdf:PDF
priority
0
comment
This paper introduces a variant of traits (different from the traits
in Self) to deal with issues in software composition. An important
difference with the previous model is that traits are flattened into
the composing class. This class is responsible to resolve any issues
that may arise during the composition (for instance name clashes).
Important insight: By introducing new language constructs, rather
than retrofitting existing language constructs, the additional constraints
on traits can be verified and enforced.
%0 Conference Paper
%1 Traits
%A Schärli, Nathanael
%A Ducasse, Stéphane
%A Nierstrasz, Oscar
%A Black, Andrew P.
%B ECOOP 2003 -- Object-Oriented Programming
%D 2003
%I Springer
%K Inheritance Mixins Multiple Reuse SDSeminar Smalltalk Traits
%P 327--339
%R 10.1007/b11832
%T Traits: Composable Units of Behavior
%U http://springerlink.metapress.com/content/169mbraepn4gmyd2/fulltext.pdf
%V 2743/2003
%X Inheritance is the fundamental reuse mechanism in object-oriented programming languages; its most prominent variants are single inheritance, multiple inheritance, and mixin inheritance. In the first part of this paper, we identify and illustrate the conceptual and practical reusability problems that arise with these forms of inheritance. We then present a simple compositional model for structuring object-oriented programs, which we call traits. Traits are essentially groups of methods that serve as building blocks for classes and are primitive units of code reuse. In this model, classes are composed from a set of traits by specifying glue code that connects the traits together and accesses the necessary state. We demonstrate how traits overcome the problems arising with the different variants of inheritance, we discuss how traits can be implemented effectively, and we summarize our experience applying traits to refactor an existing class hierarchy.
@inproceedings{Traits,
abstract = {Inheritance is the fundamental reuse mechanism in object-oriented programming languages; its most prominent variants are single inheritance, multiple inheritance, and mixin inheritance. In the first part of this paper, we identify and illustrate the conceptual and practical reusability problems that arise with these forms of inheritance. We then present a simple compositional model for structuring object-oriented programs, which we call traits. Traits are essentially groups of methods that serve as building blocks for classes and are primitive units of code reuse. In this model, classes are composed from a set of traits by specifying glue code that connects the traits together and accesses the necessary state. We demonstrate how traits overcome the problems arising with the different variants of inheritance, we discuss how traits can be implemented effectively, and we summarize our experience applying traits to refactor an existing class hierarchy.},
added-at = {2008-07-07T14:52:18.000+0200},
author = {Schärli, Nathanael and Ducasse, Stéphane and Nierstrasz, Oscar and Black, Andrew P.},
biburl = {https://www.bibsonomy.org/bibtex/27a124872b022321157f6b06f48eea3de/gron},
booktitle = {ECOOP 2003 -- Object-Oriented Programming},
citeseerurl = {http://citeseer.ist.psu.edu/566972.html},
citeulike-article-id = {3123},
comment = {This paper introduces a variant of traits (different from the traits
in Self) to deal with issues in software composition. An important
difference with the previous model is that traits are flattened into
the composing class. This class is responsible to resolve any issues
that may arise during the composition (for instance name clashes).
Important insight: By introducing new language constructs, rather
than retrofitting existing language constructs, the additional constraints
on traits can be verified and enforced.},
description = {Traits},
doi = {10.1007/b11832},
file = {TR_CSE_02-012.pdf:Traits\\TR_CSE_02-012.pdf:PDF},
institution = {Oregon Health \& Science University},
interhash = {91333454d656c0875923b1442edfb8d7},
intrahash = {7a124872b022321157f6b06f48eea3de},
keywords = {Inheritance Mixins Multiple Reuse SDSeminar Smalltalk Traits},
month = {November},
organization = {OGI School of Science \& Engineering , Oregon Health and Science University},
pages = {327--339},
priority = {0},
publisher = {Springer},
series = {Lecture Notes in Computer Science},
timestamp = {2008-07-07T14:52:20.000+0200},
title = {{Traits: Composable Units of Behavior}},
url = {http://springerlink.metapress.com/content/169mbraepn4gmyd2/fulltext.pdf},
volume = {2743/2003},
year = 2003
}