Sciweavers

TCS
2008

Extending FeatherTrait Java with Interfaces

13 years 11 months ago
Extending FeatherTrait Java with Interfaces
In the context of Featherweight Java by Igarashi, Pierce, and Wadler, and its recent extension FeatherTrait Java (FTJ) by the authors, we investigate classes that can be extended with trait composition. A trait is a collection of methods, i.e., behaviors without state; it can be viewed as an "incomplete stateless class" i.e., an interface with some already written behavior. Traits can be composed in any order, but only make sense when "imported" by a class that provides state variables and additional methods to disambiguate conflicting names arising between the imported traits. We introduce FeatherTrait Java with Interfaces (iFTJ), where traits need to be typechecked only once, which is necessary for compiling them in isolation, and considering them as regular types, like Java-interfaces with a behavioral content. Key words: Object-oriented language design, inheritance, types.
Luigi Liquori, Arnaud Spiwack
Added 15 Dec 2010
Updated 15 Dec 2010
Type Journal
Year 2008
Where TCS
Authors Luigi Liquori, Arnaud Spiwack
Comments (0)