JavaGI in the battlefield: practical experience with generalized interfaces

  • Authors:
  • Stefan Wehr;Peter Thiemann

  • Affiliations:
  • University of Freiburg, Freiburg, Germany;University of Freiburg, Freiburg, Germany

  • Venue:
  • GPCE '09 Proceedings of the eighth international conference on Generative programming and component engineering
  • Year:
  • 2009

Quantified Score

Hi-index 0.01

Visualization

Abstract

Generalized interfaces are an extension of the interface concept found in object-oriented languages such as Java or C#. The extension is inspired by Haskell's type classes. It supports retroactive and type-conditional interface implementations, binary methods, symmetric multimethods, interfaces over families of types, and static interface methods. This article reports practical experience with generalized interfaces as implemented in the JavaGI language. Several real-world case studies demonstrate how generalized interfaces provide solutions to extension and integration problems with components in binary form, how they make certain design patterns redundant, and how they eliminate various run-time errors. In each case study, the use of JavaGI results in elegant and highly readable code. Furthermore, the article discusses the implementation of a compiler and a run-time system for JavaGI. Benchmarks show that our implementation offers acceptable performance.