[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


CLOS folks,

I've got another problem with the Meta Object Protocol.  In 89-003, the
description of ENSURE-CLASS-USING-CLASS and initialization of class objects
says that the class name argument of ENSURE-CLASS-USING-CLASS is not
passed to MAKE-INSTANCE.  An anonymous class object is created, and then
give it a name and install it.  I had wondered why not just include a
:NAME argument in the initialization arguments for MAKE-INSTANCE, but I
didn't find any reason why the initialization code would have to have the
name.  However, that's only for creating an instance of STANDARD-CLASS.
For other metaclasses, the name may be required.

The example that I have run into is trying to use the meta object protocol
to define classes which are really old flavors.  The SHARED-INITIALIZE
method is supposed to install the new class in the class hierarchy, but
since old flavors has no concept of anonymous flavors, it is impossible to
do the equivalent of ADD-DIRECT-SUBCLASS without knowing the name of the

Therefore, I believe that the present model is not general enough and a
:NAME argument needs to be added to the class initialization arguments.

Another advantage of this change is that if function
(SETF CLASS-NAME) is not needed by ENSURE-CLASS-USING-CLASS, then a call
to (SETF CLASS-NAME) is a change rather than an initialization, and it
becomes possible for certain metaclasses to disallow this.  For example, I
want to signal an error if a user tries to change the name of a flavor