【24h】

Scheme with Classes, Mixins, and Traits

机译:具有类,混合素和特征的方案

获取原文
获取原文并翻译 | 示例

摘要

The Scheme language report advocates language design as the composition of a small set of orthogonal constructs, instead of a large accumulation of features. In this paper, we demonstrate how such a design scales with the addition of a class system to Scheme. Specifically, the PLT Scheme class system is a collection of orthogonal linguistic constructs for creating classes in arbitrary lexical scopes and for manipulating them as first-class values. Due to the smooth integration of classes and the core language, programmers can express mixins and traits, two major recent innovations in the object-oriented world. The class system is implemented as a macro in terms of procedures and a record-type generator; the mixin and trait patterns, in turn, are naturally codified as macros over the class system.
机译:计划语言报告主张语言设计是由少量正交结构组成的集合,而不是大量特征的组合。在本文中,我们演示了如何在Scheme中添加类系统来扩展这种设计。具体来说,PLT方案类系统是正交语言构造的集合,用于在任意词汇范围内创建类并将其作为第一类值进行操作。由于类和核心语言的顺利集成,程序员可以表达混合对象和特征,这是面向对象领域中的两项最新的重大创新。根据过程和记录类型生成器,将类系统实现为宏。依次将mixin和trait模式自然地编码为类系统上的宏。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号