Do developers benefit from generic types?: an empirical comparison of generic and raw types in java

  • Authors:
  • Michael Hoppe;Stefan Hanenberg

  • Affiliations:
  • University of Duisburg-Essen, Essen, Germany;University of Duisburg-Essen, Essen, Germany

  • Venue:
  • Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applications
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

Type systems that permit developers to express themselves more precisely are one of the primary topics in programming language research, as well as in industrial software development. While it seems plausible that an expressive static type system increases developer productivity, there is little empirical evidence for or against this hypothesis. Generic types in Java are an example: as an extension of Java's original type system, some claim that Java 1.5 improves the type system's "expressiveness." Even if this claim is true, there exists little empirical evidence that claimed expressiveness leads to a measurable increase in developer productivity. This paper introduces an experiment where generic types (in comparison to raw types) have been evaluated in three different directions: (1) the documentation impact on undocumented APIs, (2) the time required for fixing type errors, and (3) the extensibility of a generic type hierarchy. The results of the experiment suggest that generic types improve documentation and reduce extensibility -- without revealing a difference in the time required for fixing type errors.