Practical Variable-Arity Polymorphism

Practical Variable-Arity Polymorphism
复制标题

实用可变数量多态性

DOI:
--
复制
发表时间:
2009
期刊:
European Symposium on Programming
影响因子:
--
通讯作者:
M. Felleisen
M. Felleisen
中科院分区:
--
文献类型:
--
作者:
T. Strickland;Sam Tobin;M. Felleisen

文献摘要

被引文献

相似文献

就像某些函数在不同类型上具有统一行为一样,其他函数在不同类型上具有统一行为。这些变量函数广泛用于脚本语言,如Scheme和Python。静态类型语言也可以容纳适度形式的变量函数,但即使是ML和Haskell,具有高度表达类型系统的语言,也不能对非类型函数式语言中的各种变量函数进行类型检查。因此,它们的标准库包含许多相同函数定义的副本,但名称略有不同。 作为Typed Scheme项目的一部分--为PLT Scheme创建一个显式类型的姐妹语言的持续努力--我们设计并实现了一个用于变量函数的表达类型系统。在我们广泛的代码库的上下文中,我们的实际验证证实了丰富的类型系统的有用性。
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.