Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
LISP and Symbolic Computation: Abstract, 8(4)343-355
[go: Go Back, main page]

LISP and Symbolic Computation, 8(4)343-355

Simple Imperative Polymorphism

Andrew K. Wright, Department of Computer Science, Rice University, Houston, TX 77251-1892

Abstract: This paper describes a simple extension of the Hindley-Milner polymorphic type discipline to call-by-value languages that incorporate imperative features like references, exceptions, and continuations. This extension sacrifices the ability to type every purely functional expression that is typable in the Hindley-Milner system. In return, it assigns the same type to functional and imperative implementations of the same abstraction. Hence with a module system that separates specifications from implementations, imperative features can be freely used to implement polymorphic specifications. A study of a number of ML programs shows that the inability to type all Hindley-Milner typable expressions seldom impacts realistic programs. Furthermore, most programs that are rendered untypable by the new system can be easily repaired.

Keywords: continuations, functional programming, polymorphism, references, state

[local copy]
[picture of journal cover]

May 2003 - hosc@brics.dk