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

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.

[1]  Kim B. Bruce Foundations of object-oriented languages - types and semantics , 2002 .

[2]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 2001, TOPL.

[3]  Stefan Hanenberg,et al.  Type names without static type checking already improve the usability of APIs (as long as the type names are correct): an empirical study , 2014, MODULARITY.

[4]  Natalia Juristo Juzgado,et al.  Basics of Software Engineering Experimentation , 2010, Springer US.

[5]  Walter F. Tichy,et al.  A Controlled Experiment to Assess the Benefits of Procedure Argument Type Checking , 1998, IEEE Trans. Software Eng..

[6]  Luca Cardelli,et al.  On understanding types, data abstraction, and polymorphism , 1985, CSUR.

[7]  Sebastian Kleinschmager,et al.  Do static type systems improve the maintainability of software systems? An empirical study , 2012, 2012 20th IEEE International Conference on Program Comprehension (ICPC).

[8]  Sven Apel,et al.  Measuring programming experience , 2012, 2012 20th IEEE International Conference on Program Comprehension (ICPC).

[9]  Claes Wohlin,et al.  Experimentation in software engineering: an introduction , 2000 .

[10]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 1999, OOPSLA '99.

[11]  Emerson R. Murphy-Hill,et al.  Java generics adoption: how new features are introduced, championed, or ignored , 2011, MSR '11.

[12]  John C. Mitchell,et al.  F-bounded polymorphism for object-oriented programming , 1989, FPCA.

[13]  Claes Wohlin,et al.  Using Students as Subjects—A Comparative Study of Students and Professionals in Lead-Time Impact Assessment , 2000, Empirical Software Engineering.

[14]  Stefan Hanenberg Doubts about the Positive Impact of Static Type Systems on Programming Tasks in Single Developer Projects - An Empirical Study , 2010, ECOOP.

[15]  James Jaccard,et al.  Statistics for the Behavioral Sciences , 1983 .

[16]  Stefan Hanenberg,et al.  An experiment about static and dynamic type systems: doubts about the positive impact of static type systems on development time , 2010, OOPSLA.

[17]  Joseph E. Stoy Proceedings of the fourth international conference on Functional programming languages and computer architecture , 1989 .

[18]  Stefan Hanenberg,et al.  Static vs. dynamic type systems: an empirical study about the relationship between type casts and development time , 2011, DLS '11.

[19]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[20]  Martin Odersky,et al.  Making the future safe for the past: adding genericity to the Java programming language , 1998, OOPSLA '98.

[21]  Andreas Stefik,et al.  An Empirical Investigation into Programming Language Syntax , 2013, TOCE.

[22]  Stefan Hanenberg A Chronological Experience Report from an Initial Experiment Series on Static Type Systems , 2011 .

[23]  Leo A. Meyerovich,et al.  Empirical analysis of programming language adoption , 2013, OOPSLA.

[24]  Stefan Hanenberg,et al.  Is Aspect-Oriented Programming a Rewarding Investment into Future Code Changes? A Socio-technical Study on Development and Maintenance Time , 2011, 2011 IEEE 19th International Conference on Program Comprehension.

[25]  John D. Gannon An experimental evaluation of data type conventions , 1977, CACM.

[26]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[27]  Philip Wadler,et al.  Java generics and collections , 2006 .

[28]  Sebastian Kleinschmager,et al.  How to rate programming skills in programming experiments?: a preliminary, exploratory, study based on university marks, pretests, and self-estimation , 2011, PLATEAU '11.

[29]  Vibha Sazawal,et al.  Work In Progress: an Empirical Study of Static Typing in Ruby , 2009 .

[30]  Sebastian Kleinschmager,et al.  Does aspect-oriented programming increase the development speed for crosscutting code? An empirical study , 2009, 2009 3rd International Symposium on Empirical Software Engineering and Measurement.

[31]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[32]  Stefan Hanenberg,et al.  An empirical study of the influence of static type systems on the usability of undocumented software , 2012, OOPSLA '12.

[33]  Lutz Prechelt,et al.  An Empirical Comparison of Seven Programming Languages , 2000, Computer.