Article ID Journal Published Year Pages File Type
436354 Theoretical Computer Science 2008 18 Pages PDF
Abstract

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.

Related Topics
Physical Sciences and Engineering Computer Science Computational Theory and Mathematics