<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style=""><br><div>(defmethod initialize-instance :around</div><div> ((class my-class) &rest initargs
</div><div> &key direct-superclasses)</div><div> (declare (dynamic-extent initargs))</div><div> (if (loop for class in direct-superclasses</div><div> thereis (subtypep class (find-class 'my-object)))</div>
</div></blockquote><div><br>hm, this subtypep check errors on clisp when class is a forward referenced class.<br> <br>i could overcome it by (and (class-finalized-p ...)...) but that doesn't feel right. (looking at the clisp backend in closer-mop i couldn't find anything related).
<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">This idiom doesn't work in some CLOS implementations, but when you use
Closer to MOP, the respective problems are fixed, so you can use this
idiom in all implementations that Closer to MOP supports.</blockquote><br>what do you mean by "when you use
Closer to MOP"? i looked around in the sources but couldn't find anything related. it's not an important issue, i'm fine with sbcl, but as an opensource lib it's not nice to be tied to implementations.<br><br></div>
</div>-- <br>- attila<br><br>"- The truth is that I've been too considerate, and so became unintentionally cruel...<br> - I understand.<br> - No, you don't understand! We don't speak the same language!"<br>(Ingmar Bergman - Smultronstället)