[Openmcl-devel] Custom Meta Classes

Sven Van Caekenberghe sven at beta9.be
Mon Jan 19 06:07:33 PST 2004


We still have problems with this issue, specifically the following file 
can be compiled but cannot be loaded into 0.14-031220:

(defpackage :foo (:use :cl))

(in-package :foo)

(defclass my-meta-class (standard-class)
   ((extra)))

(defmethod validate-superclass ((class my-meta-class) (super 
standard-class))
   t)

(defclass foo ()
   ((bar))
   (:metaclass my-meta-class))

When I define the same code in cl-user it works...

Sven

On 16 Jan 2004, at 03:12, Gary Byers wrote:
>
> On Thu, 15 Jan 2004, Gary Byers wrote:
>>
>> On Thu, 15 Jan 2004, Sven Van Caekenberghe wrote:
>>
>>> In OpenMCL 0.13.x I could define my own meta classes like this:
>>
>> i.e., without having to define one or more VALIDATE-SUPERCLASS
>> methods which describe which subclass relationships between instances
>> of your new metaclass and those of other metaclasses make sense.

>>> This works in LispWorks 4.3 as well.
>
> Just to beat a dead horse, googling for "validate-superclass"
> revealed (among other things):
>
> <http://lispworks.com/reference/lw43/LWUG/html/lwuser-113.htm>
>
>> From your experience and from what I can infer from that page, it
> would appear that LW may provide a VALIDATE-SUPERCLASS method
> that allows the "other-class, STANDARD-CLASS" case.  That minor
> deviation from the MOP might be less confusing to most people,
> and could always be overridden by a method whose first parameter
> had higher precedence than that default.
>
> (Googling does suggest that this whole issue's confusing to many
> people.)




More information about the Openmcl-devel mailing list