Traits are fine-grained components that can be used to compose classes,
while avoiding many of the problems of multiple inheritance and mixin-based
approaches. Since most implementations of traits have focused on
dynamically-typed languages, the question naturally arises, how can
one best introduce traits to statically-typed languages, like Java
and C#? In this paper we argue that the flattening property of traits
should be used as a guiding principle for any attempt to add traits
to statically-typed languages. This property essentially states that,
semantically, traits can be compiled away. We demonstrate how this
principle applies to Featherweight-Trait Java, a conservative extension
to Featherweight Java.
%0 Journal Article
%1 Flattening
%A Nierstrasz, Oscar
%A Ducasse, St�phane
%A Sch�rli, Nathanael
%D 2006
%J Journal of Object Technology
%K SDSeminar Traits
%N 4
%P 129--148
%T Flattening Traits
%U http://www.jot.fm/issues/issue_2006_05/article4.pdf
%V 5
%X Traits are fine-grained components that can be used to compose classes,
while avoiding many of the problems of multiple inheritance and mixin-based
approaches. Since most implementations of traits have focused on
dynamically-typed languages, the question naturally arises, how can
one best introduce traits to statically-typed languages, like Java
and C#? In this paper we argue that the flattening property of traits
should be used as a guiding principle for any attempt to add traits
to statically-typed languages. This property essentially states that,
semantically, traits can be compiled away. We demonstrate how this
principle applies to Featherweight-Trait Java, a conservative extension
to Featherweight Java.
@article{Flattening,
abstract = {Traits are fine-grained components that can be used to compose classes,
while avoiding many of the problems of multiple inheritance and mixin-based
approaches. Since most implementations of traits have focused on
dynamically-typed languages, the question naturally arises, how can
one best introduce traits to statically-typed languages, like Java
and C#? In this paper we argue that the flattening property of traits
should be used as a guiding principle for any attempt to add traits
to statically-typed languages. This property essentially states that,
semantically, traits can be compiled away. We demonstrate how this
principle applies to Featherweight-Trait Java, a conservative extension
to Featherweight Java.},
added-at = {2008-06-20T12:15:49.000+0200},
author = {Nierstrasz, Oscar and Ducasse, St�phane and Sch�rli, Nathanael},
bibsource = {DBLP, http://dblp.uni-trier.de},
biburl = {https://www.bibsonomy.org/bibtex/295c1360ca6f2ec1066e02b702b0c617b/gron},
description = {Traits},
ee = {http://www.jot.fm/issues/issue_2006_05/article4},
file = {article4.pdf:Traits\\article4.pdf:PDF},
interhash = {8fac94e3ea2279fcad9e54f91895c859},
intrahash = {95c1360ca6f2ec1066e02b702b0c617b},
journal = {Journal of Object Technology},
keywords = {SDSeminar Traits},
month = May,
number = 4,
pages = {129--148},
timestamp = {2008-06-20T12:17:59.000+0200},
title = {{Flattening Traits}},
url = {http://www.jot.fm/issues/issue_2006_05/article4.pdf},
volume = 5,
year = 2006
}