Matching ThisType to subtyping
Matching ThisType to subtyping
复制标题
DOI:
10.1145/1529282.1529699
复制
发表时间:
2009-03
期刊:
影响因子:
--
通讯作者:
C. Saito;Atsushi Igarashi
中科院分区:
文献类型:
--
作者:
C. Saito;Atsushi Igarashi
The notion of ThisType has been proposed to promote typesafe reuse of binary methods and recently extended to mutually recursive definitions. It is well-known, however, that ThisType does not match with subtyping well. In the current type systems, type safety is guaranteed by the sacrifice of subtyping, hence dynamic dispatch. In this paper, we propose two mechanisms, namely, nonheritable methods and local exactization to remedy the mismatch between ThisType and subtyping. We rigorously prove their safety by modeling them in a small calculus.