From: Christophe R. <cs...@ca...> - 2017-06-28 10:25:41
|
I got lots of things wrong here. Christophe Rhodes <cs...@ca...> writes: > However: I think the reason for a depthoid of 2 (and for the failures > you see with stream) are related to the need to keep the classoids, type > system and PCL classes consistent. In particular, sequence and stream > (and file-stream) are conceptually mixin classes as well as abstract > superclasses, and there needs to be room in the classoid layout-inherits > to stuff structure-object or standard-object. Conventionally, the > allowed superclass list is One thing I got wrong is that layout-inherits is not necessarily in CPL order. > (defclass foo (stream standard-object) ...) Another thing I got wrong is that Gray streams are defined with the opposite superclass order. > I'm not sure why putting sequence at depth 1 works. Still not completely sure, but SEQUENCEP and EXTENDED-SEQUENCE-P are special-cased, whereas (typep x 'stream) will be handled by the normal hierarchical type test. That said, the special case for extended-sequence-p looks exactly like that normal hierarchical type test to my eye... Cheers, Christophe |