skip to main content
article
Public Access

The behavior of gradual types: a user study

Published:06 April 2020Publication History
Skip Abstract Section

Abstract

There are several different gradual typing semantics, reflecting different trade-offs between performance and type soundness guarantees. Notably absent, however, are any data on which of these semantics developers actually prefer.

We begin to rectify this shortcoming by surveying professional developers, computer science students, and Mechanical Turk workers on their preferences between three gradual typing semantics. These semantics reflect important points in the design space, corresponding to the behaviors of Typed Racket, TypeScript, and Reticulated Python. Our most important finding is that our respondents prefer a runtime semantics that fully enforces statically declared types.

References

  1. Esteban Allende, Oscar Callaú, Johan Fabry, Éric Tanter, and Marcus Denker. 2013. Gradual typing for Smalltalk. Science of Computer Programming 96, 1 (2013), 52–69. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Titus Barik. 2018. Error Messages as Rational Reconstructions. Ph.D. Dissertation. North Carolina State University.Google ScholarGoogle Scholar
  3. Gavin Bierman, Martin Abadi, and Mads Torgersen. 2014. Understanding TypeScript. In ECOOP. 257–281. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Gavin Bierman, Erik Meijer, and Mads Torgersen. 2010. Adding Dynamic Types to C#. In ECOOP. 76–100. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Ambrose Bonnaire-Sergeant, Rowan Davies, and Sam Tobin-Hochstadt. 2016. Practical Optional Types for Clojure. In ESOP. 68–94.Google ScholarGoogle Scholar
  6. Gilad Bracha and David Griswold. 1993. Strongtalk: Typechecking Smalltalk in a Production Environment. In OOPSLA. 215–230. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Benjamin W. Chung, Paley Li, Francesco Zappa Nardelli, and Jan Vitek. 2018. KafKa: Gradual Typing for Objects. In ECOOP. 12:1–12:23.Google ScholarGoogle Scholar
  8. Matteo Cimini and Jeremy Siek. 2017. Automatically Generating the Dynamic Semantics of Gradually Typed Languages. In POPL. 789–803. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Christos Dimoulas, Sam Tobin-Hochstadt, and Matthias Felleisen. 2012. Complete Monitors for Behavioral Contracts. In ESOP. 214–233. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Stefan Endrikat, Stefan Hanenberg, Romain Robbes, and Andreas Stefik. 2014. How Do API Documentation and Static Typing Affect API Usability?. In ICSE. 632–642. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Robert Bruce Findler and Matthias Felleisen. 2002. Contracts for Higher-Order Functions. In ICFP. 48–59. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Ben Greenman and Matthias Felleisen. 2018. A Spectrum of Type Soundness and Performance. 2, ICFP (2018), 71:1–71:32. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Ben Greenman and Zeina Migeed. 2018. On the Cost of Type-Tag Soundness. In PEPM. 30–39. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Stefan Hanenberg, Sebastian Kleinschmager, Romain Robbes, Éric Tanter, and Andreas Stefik. 2014. An empirical study on the impact of static typing on software maintainability. 19, 5 (2014), 1335–1382. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Sebastian Kleinschmager, Stefan Hanenberg, Romain Robbes, Éric Tanter, and Andreas Stefik. 2012. Do Static Type Systems Improve the Maintainability of Software Systems?: An Empirical Study. In ICPC. 153–162.Google ScholarGoogle Scholar
  16. Kenneth Knowles and Cormac Flanagan. 2010. Hybrid Type Checking. TOPLAS 32, 6 (2010), 1–34. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Andre Murbach Maidl, Fabio Mascarenhas, and Roberto Ierusalimschy. 2015. A Formalization of Typed Lua. In DLS. 13–25.Google ScholarGoogle Scholar
  18. Jacob Matthews and Robert Bruce Findler. 2009. Operational Semantics for Multi-Language Programs. TOPLAS 31, 3 (2009), 1–44. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Clemens Mayer, Stefan Hanenberg, Romain Robbes, Éric Tanter, and Andreas Stefik. 2012. An Empirical Study of the Influence of Static Type Systems on the Usability of Undocumented Software. In OOPSLA. 683–702. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Gianluca Mezzetti, Anders Møller, and Fabio Strocco. 2016. Type Unsoundness in Practice: An Empirical Study of Dart. In DLS. 13–24. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Mark S Miller, Daniel Von Dincklage, Vuk Ercegovac, and Brian Chin. 2017. Uncanny Valleys in Declarative Language Design. In SNAPL. 9:1–9:12.Google ScholarGoogle Scholar
  22. Robin Milner. 1978. A Theory of Type Polymorphism in Programming. In Journal of Computer and System Sciences, Vol. 17. 348–375.Google ScholarGoogle ScholarCross RefCross Ref
  23. Fabian Muehlboeck and Ross Tate. 2017. Sound Gradual Typing is Nominally Alive and Well. In OOPSLA. 56:1–56:30. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Brad A. Myers, John F. Pane, and Andy Ko. 2004. Natural Programming Languages and Environment. Commun. ACM (2004). Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Justin Pombrio, Shriram Krishnamurthi, and Kathi Fisler. 2017. Teaching Programming Languages by Experimental and Adversarial Thinking. In SNAPL. 13:1–13:9.Google ScholarGoogle Scholar
  26. Brianna M. Ren, John Toman, T. Stephen Strickland, and Jeffrey S. Foster. 2013. The Ruby Type Checker. In SAC. 1565–1572. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Jeremy G. Siek and Walid Taha. 2006. Gradual typing for functional languages. In Scheme and Functional Programming. 81–92.Google ScholarGoogle Scholar
  28. Jeremy G. Siek, Michael M. Vitousek, Matteo Cimini, and John Tang Boyland. 2015. Refined Criteria for Gradual Typing. In SNAPL. 274– 293.Google ScholarGoogle Scholar
  29. Carlos Souza and Eduardo Figueiredo. 2014. How Do Programmers Use Optional Typing?: An Empirical Study. In International Conference on Modularity . 109–120. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Asumu Takikawa, Daniel Feltey, Ben Greenman, Max S. New, Jan Vitek, and Matthias Felleisen. 2016. Is Sound Gradual Typing Dead?. In POPL. 456–468. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Sam Tobin-Hochstadt and Matthias Felleisen. 2006. Interlanguage Migration: from Scripts to Programs. In DLS. 964–974.Google ScholarGoogle Scholar
  32. Sam Tobin-Hochstadt and Matthias Felleisen. 2008. The Design and Implementation of Typed Scheme. In POPL. 395–406. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Sam Tobin-Hochstadt, Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, Ben Greenman, Andrew M. Kent, Vincent St-Amour, T. Stephen Strickland, and Asumu Takikawa. 2017. Migratory Typing: Ten years later. In SNAPL. 17:1–17:17.Google ScholarGoogle Scholar
  34. Preston Tunnell Wilson, Justin Pombrio, and Shriram Krishnamurthi. 2017. Can We Crowdsource Language Design?. In SPLASH Onward! 1–17.Google ScholarGoogle Scholar
  35. Michael M. Vitousek, Andrew Kent, Jeremy G. Siek, and Jim Baker. 2014. Design and Evaluation of Gradual Typing for Python. In DLS. 45–56. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Michael M. Vitousek, Cameron Swords, and Jeremy G. Siek. 2017. Big Types in Little Runtime: Open-World Soundness and Collaborative Blame for Gradual Type Systems. In POPL. 762–774. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Jack Williams, J. Garrett Morris, Philip Wadler, and Jakub Zalewski. 2017. Mixed Messages: Measuring Conformance and Non-Interference in TypeScript. In ECOOP. 28:1–28:29.Google ScholarGoogle Scholar
  38. John Wrenn and Shriram Krishnamurthi. 2017. Error Messages Are Classifiers: A Process to Design and Evaluate Error Messages. In Onward! 134–147. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Tobias Wrigstad, Francesco Zappa Nardelli, Sylvain Lebresne, Johan Ostlund, and Jan Vitek. 2010. Integrating Typed and Untyped Code in a Scripting Language. In POPL. 377–388. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. The behavior of gradual types: a user study

    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

    Full Access

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!