Gradual Typing for Generics
Gradual Typing for Generics
复制标题
泛型的逐步打字
DOI:
10.1145/2048066.2048114
复制
发表时间:
2011
期刊:
影响因子:
--
通讯作者:
Atsushi Igarashi
中科院分区:
文献类型:
--
作者:
Lintaro Ina;Atsushi Igarashi
Gradual typing is a framework to combine static and dynamic typing in a single programming language. In this paper, we develop a gradual type system for class-based object-oriented languages with generics. We introduce a special type to denote dynamically typed parts of a program; unlike dynamic types introduced to C# 4.0, however, our type system allows for more seamless integration of dynamically and statically typed code.We formalize a gradual type system for Featherweight GJ with a semantics given by a translation that inserts explicit run-time checks. The type system guarantees that statically typed parts of a program do not go wrong, even if it includes dynamically typed parts. We also describe a basic implementation scheme for Java and report preliminary performance evaluation.