Ad-hoc polymorphism and dynamic typing in a statically typed functional language

  • Authors:
  • Thomas van Noort;Peter Achten;Rinus Plasmeijer

  • Affiliations:
  • Radboud University Nijmegen, Nijmegen, Netherlands;Radboud University Nijmegen, Nijmegen, Netherlands;Radboud University Nijmegen, Nijmegen, Netherlands

  • Venue:
  • Proceedings of the 6th ACM SIGPLAN workshop on Generic programming
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Static typing in functional programming languages such as Clean, Haskell, and ML is highly beneficial: it prevents erroneous behaviour at run time and provides opportunities for optimisations. However, dynamic typing is just as important as sometimes types are not known until run time. Examples are exchanging values between applications by deserialisation from disk, input provided by a user, or obtaining values via a network connection. Ideally, a static typing system works in close harmony with an orthogonal dynamic typing system; not discriminating between statically and dynamically typed values. In contrast to Haskell's minimal support for dynamic typing, Clean has an extensive dynamic typing; it adopted ML's support for monomorphism and parametric polymorphism and added the notion of type dependencies. Unfortunately, ad-hoc polymorphism has been left out of the equation over the years. While both ad-hoc polymorphism and dynamic typing have been studied in-depth earlier, their interaction in a statically typed functional language has not been studied before. In this paper we explore the design space of their interactions.