【24h】

Revisiting Parametric Types and Virtual Classes

机译:重新访问参数类型和虚拟类

获取原文

摘要

This paper presents a conceptually oriented updated view on the relationship between parametric types and virtual classes. The traditional view is that parametric types excel at structurally oriented composition and decomposition, and virtual classes excel at specifying mutually recursive families of classes whose relationships are preserved in derived families. Conversely, while class families can be specified using a large number of F-bounded type parameters, this approach is complex and fragile; and it is difficult to use traditional virtual classes to specify object composition in a structural manner, because virtual classes are closely tied to nominal typing. This paper adds new insight about the dichotomy between these two approaches; it illustrates how virtual constraints and type refinements, as recently introduced in gbeta and SCALA, enable structural treatment of virtual types; finally, it shows how a novel kind of dynamic type check can detect compatibility among entire families of classes.
机译:本文介绍了参数类型和虚拟类之间关系的概念上的更新视图。传统观点是参数型在结构上导向的组成和分解,以及虚拟类Excel,在指定在衍生的家庭中保留的班级的相互递归家庭。相反,虽然可以使用大量的F界类型参数指定课堂系列,但这种方法很复杂,脆弱;并且很难使用传统的虚拟类以结构方式指定对象构图,因为虚拟类与标称键入密切相关。本文增加了对这两种方法之间的二分法的新洞察力;它说明了如何在Gbeta和Scala中推出的虚拟约束和型改进,使得虚拟类型的结构处理;最后,它显示了一种新颖的动态类型检查如何检测整个课程的兼容性。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号