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.
Cite
CITATION STYLE
Nierstrasz, O., Ducasse, S., & Schärli, N. (2006). Flattening traits. Journal of Object Technology, 5(4), 129–148. https://doi.org/10.5381/jot.2006.5.4.a4
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.