Unifying Genericity - Combining The Benefits Of Virtual Types And Parameterized Classes
ECOOP '99: Proceedings of the 13th European Conference on Object-Oriented Programming(1999)
摘要
Generic types in programming languages are most often supported with various forms of parametric polymorphism, i.e. functions on types. Within the framework of object-oriented languages, virtual types present an alternative where specific types are derived from generic ones using inheritance rather than function application. While both mechanisms are statically safe and support basic genericity, they have very different typing properties, each of them providing for the description of useful relationships, which are not expressible with the other. In this paper we present, through the use of examples, a mechanism for describing generic classes: structural virtual types. This mechanism is essentially a merger of parameterized classes and virtual types and includes the benefits of both, in particular retaining mutual recursion and covariance of virtual types as well as the function-like nature of parameterized classes.
更多查看译文
关键词
virtual type,parameterized class,structural virtual type,generic class,generic type,basic genericity,different typing property,function application,function-like nature,mutual recursion,Parameterized Classes,Unifying Genericity,Virtual Types
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络