arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1804.07272cs.SE
收藏

Smalltalk中的元类和反射

Metaclasses and Reflection in Smalltalk

Tony Clark

摘要:

许多面向对象的程序设计语言提供反射特性,这些反射特性可用于控制语言的解释机制。通常这些特性是相对于由对象类和元类组成的金色辫子定义的。这份报告回顾了Smalltalk金色辫子,并将其推广到多重继承,从而导致在许多不同的继承策略之间进行选择。Smalltalk的反射特性不会影响继承的基本机制,因此必须对多重继承进行任意选择。描述了一种语言,其中Smalltalk的反射功能进行了扩展,以便允许程序员定义的继承策略。

英文摘要:

Many Object Oriented Programming Languages provide reflective features which may be used to control the interpretive mechanism of the language. Often these features are defined with respect to a golden braid consisting of objects classes and meta-classes. This report reviews the Smalltalk golden braid and generalize it for multiple inheritance leading to choices between many different inheritance strategies. The reflective features of Smalltalk cannot affect the basic mechanisms of inheritance and so an arbitrary choice must be made for multiple inheritance. A language is described in which the reflective features of Smalltalk are extended so as to allow programmer defined inheritance strategies.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑