This paper introduces a new metaobject, the generalizer, which complements the existing specializer metaobject. With the help of examples, we show that this metaobject allows for the efficient implementation of complex non-class-based dispatch within the framework of existing metaobject protocols. We present our modifications to the generic function invocation protocol from the Art of the Metaobject Protocol; in combination with previous work, this produces a fully-functional extension of the existing mechanism for method selection and combination, including support for method combination completely independent from method selection. We discuss our implementation, within the SBCL implementation of Common Lisp, and in that context compare the performance of the new protocol with the standard one, demonstrating that the new protocol can be tolerably efficient.
翻译:本文介绍了一个新的元体,即通用化,它补充了现有的特殊化元体元体。我们通过举例,表明该元体能够在现有元体议定书的框架内有效地实施复杂的非级非级发送。我们介绍了我们对《代形物体议定书》中的通用功能援引协议的修改;这与先前的工作相结合,使现有的方法选择和组合机制具有充分功能的延伸,包括支持完全独立于方法选择的方法组合。我们讨论了我们在SBCL执行共同激光器中的实施情况,并在此背景下将新协议的性能与标准协议进行比较,表明新的协议可以非常有效。