<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr">You need methods on validate-superclass. AMOP doesn't talk about this if I remember right, and it may be that CLOSette doesn't enforce that.</div><div dir="ltr"><br></div><div dir="ltr">--t</div><div dir="ltr"><br><blockquote type="cite">On 4 Mar 2021, at 22:07, Paul Krueger <plkrueger@comcast.net> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><span style="font-family: Monaco; font-size: 12px;" class="">I was trying to do a little MOP hacking and when what I was trying to do got errors I went back to “The Art of the Metaobject Protocol” and ran an example from there to see if it encountered similar errors, which it did (most of this from p. 72 of the book):</span><br style="font-family: Monaco; font-size: 12px;" class=""><br style="font-family: Monaco; font-size: 12px;" class=""><span style="font-family: Monaco; font-size: 12px;" class="">I’m running Clozure Common Lisp Version 1.11.6 (v1.11.6) DarwinX8664</span><br style="font-family: Monaco; font-size: 12px;" class=""><br style="font-family: Monaco; font-size: 12px;" class=""><span style="font-family: Monaco; font-size: 12px;" class="">? (defclass rectangle ()</span><br style="font-family: Monaco; font-size: 12px;" class=""><span style="font-family: Monaco; font-size: 12px;" class=""> ((height :initform 0.0 :initarg :height)</span><br style="font-family: Monaco; font-size: 12px;" class=""><span style="font-family: Monaco; font-size: 12px;" class=""> (width :initform 0.0 :initarg :width)))</span><br style="font-family: Monaco; font-size: 12px;" class=""><span style="font-family: Monaco; font-size: 12px;" class="">#<STANDARD-CLASS RECTANGLE></span><br style="font-family: Monaco; font-size: 12px;" class=""><span style="font-family: Monaco; font-size: 12px;" class="">? (defclass counted-class (standard-class)</span><br style="font-family: Monaco; font-size: 12px;" class=""><span style="font-family: Monaco; font-size: 12px;" class=""> ((counter :initform 0)))</span><br style="font-family: Monaco; font-size: 12px;" class=""><span style="font-family: Monaco; font-size: 12px;" class="">#<STANDARD-CLASS COUNTED-CLASS></span><br style="font-family: Monaco; font-size: 12px;" class=""><span style="font-family: Monaco; font-size: 12px;" class="">? (setf (find-class 'counted-rectangle)</span><br style="font-family: Monaco; font-size: 12px;" class=""><span style="font-family: Monaco; font-size: 12px;" class=""> (make-instance 'counted-class</span><br style="font-family: Monaco; font-size: 12px;" class=""><span style="font-family: Monaco; font-size: 12px;" class=""> :name 'counted-rectangle</span><br style="font-family: Monaco; font-size: 12px;" class=""><span style="font-family: Monaco; font-size: 12px;" class=""> :direct-superclasses (list (find-class 'rectangle))</span><br style="font-family: Monaco; font-size: 12px;" class=""><span style="font-family: Monaco; font-size: 12px;" class=""> :direct-slots ()))</span><br style="font-family: Monaco; font-size: 12px;" class=""><blockquote type="cite" style="font-family: Monaco; font-size: 12px;" class="">Error: The class #<STANDARD-CLASS RECTANGLE> was specified as a<br class=""> super-class of the class #<COUNTED-CLASS COUNTED-RECTANGLE>;<br class=""> but the meta-classes #<STANDARD-CLASS STANDARD-CLASS> and<br class=""> #<STANDARD-CLASS COUNTED-CLASS> are incompatible.<br class="">While executing: #<CCL::STANDARD-KERNEL-METHOD CCL::ENSURE-CLASS-INITIALIZED (CCL::SLOTS-CLASS)>, in process Listener(4).<br class="">Type cmd-. to abort, cmd-\ for a list of available restarts.<br class="">Type :? for other options.<br class=""></blockquote><span style="font-family: Monaco; font-size: 12px;" class="">1 > </span><br style="font-family: Monaco; font-size: 12px;" class=""><span style="font-family: Monaco; font-size: 12px;" class="">?</span><br style="font-family: Monaco; font-size: 12px;" class=""><br style="font-family: Monaco; font-size: 12px;" class=""><span style="font-family: Monaco; font-size: 12px;" class="">My question is whether this is a problem with CCL’s implementation or a spec change of some sort that invalidates the example from the book. It’s not clear to me how you could ever employ meta-classes without getting this sort of error in CCL, so if this isn’t a bug, what’s the work-around?</span><br style="font-family: Monaco; font-size: 12px;" class=""><br style="font-family: Monaco; font-size: 12px;" class=""><span style="font-family: Monaco; font-size: 12px;" class="">Thanks ...</span><span>_______________________________________________</span><br><span>Openmcl-devel mailing list</span><br><span>Openmcl-devel@clozure.com</span><br><span>https://lists.clozure.com/mailman/listinfo/openmcl-devel</span><br></div></blockquote></body></html>