2003
DOI: 10.1007/978-3-540-45070-2_12
|View full text |Cite
|
Sign up to set email alerts
|

Traits: Composable Units of Behaviour

Abstract: Abstract. Despite the undisputed prominence of inheritance as the fundamental reuse mechanism in object-oriented programming languages, the main variantssingle inheritance, multiple inheritance, and mixin inheritance -all suffer from conceptual and practical problems. In the first part of this paper, we identify and illustrate these problems. We then present traits, a simple compositional model for structuring object-oriented programs. A trait is essentially a group of pure methods that serves as a building bl… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
1
1
1
1

Citation Types

2
285
0

Year Published

2005
2005
2015
2015

Publication Types

Select...
6
3

Relationship

2
7

Authors

Journals

citations
Cited by 255 publications
(287 citation statements)
references
References 34 publications
2
285
0
Order By: Relevance
“…On the other hand, these languages do not provide the notion of role casting we introduce in powerJava. Roles as double face interfaces have some similarities with Traits [23] and Mixins. However, they are distinguished because roles are used to extend instances and not classes.…”
Section: Resultsmentioning
confidence: 99%
“…On the other hand, these languages do not provide the notion of role casting we introduce in powerJava. Roles as double face interfaces have some similarities with Traits [23] and Mixins. However, they are distinguished because roles are used to extend instances and not classes.…”
Section: Resultsmentioning
confidence: 99%
“…Note that a named protocol can serve to give a type to a trait [19]. However, traits come with a specific implementation, while named protocols are pure interface specifications.…”
Section: Consequently There Are Three Possible Values For Atmentioning
confidence: 99%
“…Traits [46,22] have been designed as an alternative mechanism of code reuse. Initially they were introduced in a untyped setting as an extension of Smalltalk [22,46].…”
Section: Limitations Of Composition Mechanismsmentioning
confidence: 99%
“…In its classical, single-inheritance version, this mechanism is simple, however often not sufficient. In order to overcome its limits, other proposals were developed, like multiple inheritance, mixins [43,17,15,8,24,14,7] and traits [46,22]. Multiple inheritance is perceived as too complicated and too dangerous [20].…”
Section: Introductionmentioning
confidence: 99%