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 2013Publication 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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Bruce, K. B. Foundations of object-oriented languages: types and semantics. MIT Press, Cambridge, MA, USA, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Cardelli, L., and Wegner, P. On understanding types, data abstraction, and polymorphism. ACM Comput. Surv. 17, 4 (Dec. 1985), 471--523. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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).Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  9. Gamma, E., Helm, R., Johnson, R., and Vlissides, J. Design patterns: elements of reusable object-oriented software. Addison-Wesley Professional, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Gannon, J. D. An experimental evaluation of data type conventions. Commun. ACM 20, 8 (1977), 584--595. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Gravetter, F., and Wallnau, L. Statistics for the Behavioral Sciences. Cengage Learning, 2008.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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).Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Juristo, N., and Moreno, A. M. Basics of Software Engineering Experimentation. Springer, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Milner, R. A theory of type polymorphism in programming. Journal of Computer and System Sciences 17 (1978), 348--375.Google ScholarGoogle ScholarCross RefCross Ref
  24. Naftalin, M., and Wadler, P. Java generics and collections. O'Reilly, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Pierce, B. C. Types and programming languages. MIT Press, Cambridge, MA, USA, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Prechelt, L. An empirical comparison of seven programming languages. IEEE Computer 33 (2000), 23--29. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  30. Stefik, A., , and Siebert, S. An empirical investigation into programming language syntax. ACM Transactions on Computing Education (2013, In Print).Google ScholarGoogle Scholar
  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.Google ScholarGoogle Scholar
  32. Steinberg, M., and Hanenberg, S. What is the impact of static type systems on debugging type errors and semantic errors? - submitted.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

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

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • 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

      Copyright © 2013 ACM

      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]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 29 October 2013

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      OOPSLA '13 Paper Acceptance Rate50of189submissions,26%Overall Acceptance Rate268of1,244submissions,22%

      Upcoming Conference

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader