Authors
Lorenzo Bettini, Ferruccio Damiani, Ina Schaefer, Fabio Strocco
Publication date
2013/5/1
Journal
Science of Computer Programming
Volume
78
Issue
5
Pages
521-541
Publisher
Elsevier
Description
Traits have been designed as units for fine-grained reuse of behavior in the object-oriented paradigm. Records have been devised to complement traits for fine-grained reuse of state. In this paper, we present the language TraitRecordJ, a Java dialect with records and traits. Records and traits can be composed by explicit linguistic operations, allowing code manipulations to achieve fine-grained code reuse. Classes are assembled from (composite) records and traits and instantiated to generate objects. We introduce the language through examples and illustrate the prototypical implementation of TraitRecordJ using Xtext, an Eclipse framework for the development of programming languages as well as other domain-specific languages. Our implementation comprises an Eclipse-based editor for TraitRecordJ with typical IDE functionalities, and a stand-alone compiler, which translates TraitRecordJ programs into …
Total citations
201220132014201520162017201820192020202120222023143322221133
Scholar articles
L Bettini, F Damiani, I Schaefer, F Strocco - Science of Computer Programming, 2013