<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On 1 Nov 2006, at 00:58, Attila Lendvai wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><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></DIV></DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Hm, that shouldn't be the case, but maybe I missed it. Clisp's support for forward-referenced-class is indeed not very good.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Try (subtypep (class-name class) 'my-object) instead. It may or may not work, so please let me know if it does.</DIV><BR><BLOCKQUOTE type="cite"><DIV><DIV><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></DIV></DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Sure. I was pretty sure that this is forward-reference-class is handled properly here as well, but obviously, it's not.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>There are a few possibilities to fix this, either maybe in Closer to MOP, or probably better by filing a bug report with clisp. I will look into this...</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Cheers,</DIV><DIV>Pascal</DIV></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>-- </DIV><DIV>Pascal Costanza, <A href="mailto:pc@p-cos.net">mailto:pc@p-cos.net</A>, <A href="http://p-cos.net">http://p-cos.net</A></DIV><DIV>Vrije Universiteit Brussel, Programming Technology Lab</DIV><DIV>Pleinlaan 2, B-1050 Brussel, Belgium</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>