skip to main content
10.1145/2509136.2509528acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

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

Published: 29 October 2013 Publication History

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.

References

[1]
Arnold, K. Generics considered harmful. blog entry available at http://weblogs.java.net/blog/arnold/archive/ 2005/06/generics\_consid\_1.html, last visit Dec 2012, 2005.
[2]
Bracha, G., Odersky, M., Stoutamire, D., and Wadler, P. Making the future safe for the past: Adding genericity to the java programming language. In Proceedings of the 1998 ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages & Applications (OOPSLA '98), Vancouver, British Columbia, Canada, October 18--22, 1998 (1998), ACM, pp. 183--200.
[3]
Bruce, K. B. Foundations of object-oriented languages: types and semantics. MIT Press, Cambridge, MA, USA, 2002.
[4]
Canning, P., Cook, W., Hill, W., Olthoff, W., and Mitchell, J. C. F-bounded polymorphism for object-oriented programming. In Proceedings of the fourth international conference on Functional programming languages and computer architecture (New York, NY, USA, 1989), FPCA '89, ACM, pp. 273--280.
[5]
Cardelli, L., and Wegner, P. On understanding types, data abstraction, and polymorphism. ACM Comput. Surv. 17, 4 (Dec. 1985), 471--523.
[6]
Daly, M. T., Sazawal, V., and Foster, J. S. Work in progress: an empirical study of static typing in ruby. Workshop on Evaluation and Usability of Programming Languages and Tools (PLATEAU),Orlando, October 2009 (2009).
[7]
Endrikat, S., and Hanenberg, S. Is aspect-oriented programming a rewarding investment into future code changes? A socio-technical study on development and maintenance time. In Proceedings of the 2011 IEEE 19th International Conference on Program Comprehension (Kingston, CA, 2011), ICPC '11, IEEE Computer Society, pp. 51--60.
[8]
Feigenspan, J., K\"astner, C., Liebig, J., Apel, S., and Hanenberg, S. Measuring programming experience. In IEEE 20th International Conference on Program Comprehension, ICPC 2012, Passau, Germany, June 11--13, 2012 (2012), pp. 73--82.
[9]
Gamma, E., Helm, R., Johnson, R., and Vlissides, J. Design patterns: elements of reusable object-oriented software. Addison-Wesley Professional, 1995.
[10]
Gannon, J. D. An experimental evaluation of data type conventions. Commun. ACM 20, 8 (1977), 584--595.
[11]
Gravetter, F., and Wallnau, L. Statistics for the Behavioral Sciences. Cengage Learning, 2008.
[12]
Hanenberg, S. Doubts about the positive impact of static type systems on programming tasks in single developer projects - an empirical study. In ECOOP 2010 - Object-Oriented Programming, 24th European Conference, Maribor, Slovenia, June 21--25, 2010. Proceedings (2010), LNCS 6183, Springer, pp. 300--303.
[13]
Hanenberg, S. An experiment about static and dynamic type systems: Doubts about the positive impact of static type systems on development time. In Proceedings of the ACM international conference on Object oriented programming systems languages and applications (New York, NY, USA, 2010), OOPSLA, ACM, pp. 22--35.
[14]
Hanenberg, S. A chronological experience report from an initial experiment series on static type systems. In 2nd Workshop on Empirical Evaluation of Software Composition Techniques (ESCOT) (Lancaster, UK, 2011).
[15]
Hanenberg, S., Kleinschmager, S., and Josupeit-Walter, M. Does aspect-oriented programming increase the development speed for crosscutting code? an empirical study. In Proceedings of ESEM (2009), pp. 156--167.
[16]
Höst, M., Regnell, B., and Wohlin, C. Using students as subjects--a comparative study of students and professionals in lead-time impact assessment. Empirical Softw. Engg. 5, 3 (2000), 201--214.
[17]
Igarashi, A., Pierce, B. C., and Wadler, P. Featherwieght java: A minimal core calculus for java and gj. In Proceedings of the 1999 ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages & Applications (OOPSLA '99), Denver, Colorado, USA, November 1--5, 1999 (1999), ACM, pp. 132--146.
[18]
Juristo, N., and Moreno, A. M. Basics of Software Engineering Experimentation. Springer, 2001.
[19]
Kleinschmager, S., and Hanenberg, S. How to rate programming skills in programming experiments? A preliminary, exploratory study based on university marks, pretests, and self-estimation. In Workshop PLATEAU at SPLASH (Portland, USA, October 2011), pp. 15--24.
[20]
Kleinschmager, S., Hanenberg, S., Robbes, R., Tanter, É., and Stefik, A. Do static type systems improve the maintainability of software systems? An empirical study. In IEEE 20th International Conference on Program Comprehension, ICPC 2012, Passau, Germany, June 11--13 (2012), pp. 153--162.
[21]
Mayer, C., Hanenberg, S., Robbes, R., Tanter, É., and Stefik, A. An empirical study of the influence of static type systems on the usability of undocumented software. In Proceedings of the 27th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2012, part of SPLASH 2012, Tucson, AZ, USA, October 21--25, 2012 (2012), ACM, pp. 683--702.
[22]
Meyerovich, L. A., and Rabkin, A. Empirical analysis of programming language adoption. In Proceedings of the Conference on Object-Oriented Programming Systems, Languages & Applications (OOPSLA '13), Indianapolis, Indiana, USA, October 26--31, 2013 (2013), ACM.
[23]
Milner, R. A theory of type polymorphism in programming. Journal of Computer and System Sciences 17 (1978), 348--375.
[24]
Naftalin, M., and Wadler, P. Java generics and collections. O'Reilly, 2006.
[25]
Parnin, C., Bird, C., and Murphy-Hill, E. R. Java generics adoption: how new features are introduced, championed, or ignored. In Proceedings of the 8th International Working Conference on Mining Software Repositories, MSR 2011 (Co-located with ICSE), Waikiki, Honolulu, HI, USA, May 21--28, 2011, Proceedings (2011), IEEE, pp. 3--12.
[26]
Pierce, B. C. Types and programming languages. MIT Press, Cambridge, MA, USA, 2002.
[27]
Prechelt, L. An empirical comparison of seven programming languages. IEEE Computer 33 (2000), 23--29.
[28]
Prechelt, L., and Tichy, W. F. A controlled experiment to assess the benefits of procedure argument type checking. IEEE Trans. Softw. Eng. 24, 4 (1998), 302--312.
[29]
Spiza, S., and Hanenberg, S. Type names without static type checking already improve the usability of apis -- as long as the type names are correct: An empirical study -- submitted to gpce 2013.
[30]
Stefik, A., and Siebert, S. An empirical investigation into programming language syntax. ACM Transactions on Computing Education (2013, In Print).
[31]
Steinberg, M. What is the impact of static type systems on maintenance tasks? An empirical study of differences in debugging time using statically and dynamically typed languages. Master Thesis, Institute for Computer Science and Business Information Systems, University of Duisburg-Essen, http://dawis2.cs.uni-due.de/ests/2011_MA_MarvinSteinberg_SH.pdf, January, 2011.
[32]
Steinberg, M., and Hanenberg, S. What is the impact of static type systems on debugging type errors and semantic errors? - submitted.
[33]
Stuchlik, A., and Hanenberg, S. Static vs. dynamic type systems: An empirical study about the relationship between type casts and development time. In Proceedings of the 7th symposium on Dynamic languages (Portland, Oregon, USA, 2011), DLS '11, ACM, pp. 97--106.
[34]
Wohlin, C., Runeson, P., Höst, M., Ohlsson, M. C., Regnell, B., and Wesslén, A. Experimentation in software engineering: an introduction. Kluwer Academic Publishers, Norwell, MA, USA, 2000.

Cited By

View all
  • (2021)Characterizing the Usage, Evolution and Impact of Java Annotations in PracticeIEEE Transactions on Software Engineering10.1109/TSE.2019.291051647:5(969-986)Online publication date: 1-May-2021
  • (2021)Two N-of-1 self-trials on readability differences between anonymous inner classes (AICs) and lambda expressions (LEs) on Java code snippetsEmpirical Software Engineering10.1007/s10664-021-10077-327:2Online publication date: 20-Dec-2021
  • (2020)A randomized controlled trial on the effects of embedded computer language switchingProceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3368089.3409701(410-420)Online publication date: 8-Nov-2020
  • Show More Cited By

Index Terms

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

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    OOPSLA '13: Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applications
    October 2013
    904 pages
    ISBN:9781450323741
    DOI:10.1145/2509136
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 29 October 2013

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. empirical research
    2. generic types
    3. programming languages
    4. type systems

    Qualifiers

    • Research-article

    Conference

    SPLASH '13
    Sponsor:

    Acceptance Rates

    OOPSLA '13 Paper Acceptance Rate 50 of 189 submissions, 26%;
    Overall Acceptance Rate 268 of 1,244 submissions, 22%

    Upcoming Conference

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)23
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 09 Sep 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2021)Characterizing the Usage, Evolution and Impact of Java Annotations in PracticeIEEE Transactions on Software Engineering10.1109/TSE.2019.291051647:5(969-986)Online publication date: 1-May-2021
    • (2021)Two N-of-1 self-trials on readability differences between anonymous inner classes (AICs) and lambda expressions (LEs) on Java code snippetsEmpirical Software Engineering10.1007/s10664-021-10077-327:2Online publication date: 20-Dec-2021
    • (2020)A randomized controlled trial on the effects of embedded computer language switchingProceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3368089.3409701(410-420)Online publication date: 8-Nov-2020
    • (2020)How C++ Templates Are Used for Generic ProgrammingACM Transactions on Software Engineering and Methodology10.1145/335657929:1(1-49)Online publication date: 30-Jan-2020
    • (2017)On the Positive Effect of Reactive Programming on Software ComprehensionIEEE Transactions on Software Engineering10.1109/TSE.2017.265552443:12(1125-1143)Online publication date: 1-Dec-2017
    • (2017)Empirical, Human-Centered Evaluation of Programming and Programming Language Constructs: Controlled ExperimentsGrand Timely Topics in Software Engineering10.1007/978-3-319-60074-1_3(45-72)Online publication date: 29-Jun-2017
    • (2016)Type unsoundness in practice: an empirical study of DartACM SIGPLAN Notices10.1145/3093334.298922752:2(13-24)Online publication date: 1-Nov-2016
    • (2016)Type unsoundness in practice: an empirical study of DartProceedings of the 12th Symposium on Dynamic Languages10.1145/2989225.2989227(13-24)Online publication date: 1-Nov-2016
    • (2016)An empirical study on the impact of C++ lambdas and programmer experienceProceedings of the 38th International Conference on Software Engineering10.1145/2884781.2884849(760-771)Online publication date: 14-May-2016
    • (2016)Can we enforce a benefit for dynamically typed languages in comparison to statically typed ones? A controlled experiment2016 IEEE 24th International Conference on Program Comprehension (ICPC)10.1109/ICPC.2016.7503719(1-10)Online publication date: May-2016
    • Show More Cited By

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media