Polymorphism by name for references and continuations

This article investigates an ML-like language with byname semantics for polymorphism: polymorphic objects are not evaluated once for all at generalization time, but re-evaluated at each specialization. Unlike the standard ML semantics, the by-name semantics works well with polymorphic references and polymorphic continuations: the naive typing rules for references and for continuations are sound with respect to this semantics. Polymorphism by name leads to a better integration of these imperative features into the ML type discipline. Practical experience shows that it retains most of the efficiency and predictability of polymorphism by value.

[1]  Andrew K. Wright Typing References by Effect Inference , 1992, ESOP.

[2]  John C. Reynolds,et al.  Definitional Interpreters for Higher-Order Programming Languages , 1972, ACM '72.

[3]  X. Leroy Typage polymorphe d'un langage algorithmique , 1992 .

[4]  Xavier Leroy,et al.  The ZINC experiment : an economical implementation of the ML language , 1990 .

[5]  Robin Milner,et al.  Co-Induction in Relational Semantics , 1991, Theor. Comput. Sci..

[6]  Robert Harper,et al.  Typing first-class continuations in ML , 1991, POPL '91.

[7]  Luís Damas,et al.  Type assignment in programming languages , 1984 .

[8]  Luca Cardelli,et al.  Typeful Programming , 1989, Formal Description of Programming Concepts.

[9]  Matthias Felleisen,et al.  Control operators, the SECD-machine, and the λ-calculus , 1987, Formal Description of Programming Concepts.

[10]  Robin Milner,et al.  Definition of standard ML , 1990 .

[11]  Xavier Leroy,et al.  Polymorphic type inference and assignment , 1991, POPL '91.

[12]  Mads Tofte,et al.  Type Inference for Polymorphic References , 1990, Inf. Comput..

[13]  Andrew W. Appel,et al.  Compiling with Continuations , 1991 .

[14]  Matthias Felleisen,et al.  A Syntactic Approach to Type Soundness , 1994, Inf. Comput..

[15]  John C. Mitchell,et al.  Type Systems for Programming Languages , 1991, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[16]  Mark Lillibridge,et al.  Polymorphic type assignment and CPS conversion , 1993, LISP Symb. Comput..

[17]  Pierre Jouvelot,et al.  The type and effect discipline , 1992, [1992] Proceedings of the Seventh Annual IEEE Symposium on Logic in Computer Science.

[18]  Mark Lillibridge,et al.  Explicit polymorphism and CPS conversion , 1993, POPL '93.

[19]  David K. Gifford,et al.  Integrating functional and imperative programming , 1986, LFP '86.