Trait-oriented Programming in Java 8 - Inria - Institut national de recherche en sciences et technologies du numérique Access content directly
Conference Papers Year : 2014

Trait-oriented Programming in Java 8

Abstract

Java 8 was released recently. Along with lambda expressions, a new language construct is introduced: default methods in interfaces. The intent of this feature is to allow interfaces to be extended over time preserving backward compatibility. In this paper, we show a possible, different use of interfaces with default methods: we introduce a trait-oriented programming style based on an interface-as- trait idea, with the aim of improving code modularity. Starting from the most common operators on traits, we introduce some programming patterns mimicking such operators and discuss this approach.
Fichier principal
Vignette du fichier
mainPPPJ14.pdf (103.41 Ko) Télécharger le fichier
Origin : Files produced by the author(s)
Loading...

Dates and versions

hal-01026531 , version 1 (22-08-2014)

Identifiers

  • HAL Id : hal-01026531 , version 1

Cite

Viviana Bono, Enrico Mensa, Marco Naddeo. Trait-oriented Programming in Java 8. PPPJ'14: International Conference on Principles and Practices of Programming on the Java Platform: virtual machines, languages, and tools, Sep 2014, Cracow, Poland. ⟨hal-01026531⟩
871 View
3479 Download

Share

Gmail Facebook X LinkedIn More