Practical Variable-Arity Polymorphism

  • T. Stephen Strickland
  • Sam Tobin-Hochstadt
  • Matthias Felleisen
Conference paper

DOI: 10.1007/978-3-642-00590-9_3

Part of the Lecture Notes in Computer Science book series (LNCS, volume 5502)
Cite this paper as:
Strickland T.S., Tobin-Hochstadt S., Felleisen M. (2009) Practical Variable-Arity Polymorphism. In: Castagna G. (eds) Programming Languages and Systems. ESOP 2009. Lecture Notes in Computer Science, vol 5502. Springer, Berlin, Heidelberg

Abstract

Just as some functions have uniform behavior over distinct types, other functions have uniform behavior over distinct arities. These variable-arity functions are widely used in scripting languages such as Scheme and Python. Statically typed languages also accommodate modest forms of variable-arity functions, but even ML and Haskell, languages with highly expressive type systems, cannot type check the wide variety of variable-arity functions found in untyped functional languages. Consequently, their standard libraries contain numerous copies of the same function definition with slightly different names.

As part of the Typed Scheme project—an on-going effort to create an explicitly typed sister language for PLT Scheme—we have designed and implemented an expressive type system for variable-arity functions. Our practical validation in the context of our extensive code base confirms the usefulness of the enriched type system.

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • T. Stephen Strickland
    • 1
  • Sam Tobin-Hochstadt
    • 1
  • Matthias Felleisen
    • 1
  1. 1.PLT @ Northeastern University 

Personalised recommendations