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

MOP slot definition questions



A couple more problems with document 89-003:

Page 3-91 says that methods should be defined for generic functions
SLOT-DEFINITION-NAME, SLOT-DEFINITION-INITFORM, etc.  on class
SLOT-DEFINITION, but page 3-71 says that these items are initialized by
a SHARED-INITIALIZE method on class STANDARD-SLOT-DEFINITION.  This is
inconsistent.  I believe that page 3-91 should specify that these
methods are on class STANDARD-SLOT-DEFINITION.  Likewise, the primary
methods for SLOT-DEFINITION-READERS and SLOT-DEFINITION-WRITERS at the
bottom of the page should be on class STANDARD-DIRECT-SLOT-DEFINITION.

In the implementation of DEFCLASS, page 3-15 says that ENSURE-CLASS will
be called with the :SLOTS argument being a list of "canonicalized slot
definitions", which are lists, as described on page 3-14.  The description
of ENSURE-CLASS on page 3-48 doesn't mention :SLOTS; presumably they are
passed through unchanged to ENSURE-CLASS-USING-CLASS.  The description of
ENSURE-CLASS-USING-CLASS does not explicitly mention :SLOTS, but says on
page 3-51 that "All other keyword arguments are included directly in the
initialization arguments." Page 3-62 says that INITIALIZE-INSTANCE doesn't
do anything special for classes.  Page 3-63 says that the :SLOTS argument
for the SHARED-INITIALIZE method "is a list of direct slot definition
objects.  ...  An error is signalled if ...  any element of this argument
is not of type DIRECT-SLOT-DEFINITION." So this chain of events is begun
by passing in a list, and we expect to receive an object at the end, but
nobody is specified to perform that conversion.  The call graph shows
SHARED-INITIALIZE calling something called DIRECT-SLOT-DEFINITION-CLASS,
which suggests that the call to MAKE-INSTANCE should be done at that
level, although I can't find any reference to DIRECT-SLOT-DEFINITION-CLASS
in the document.  Doing it in SHARED-INITIALIZE would make sense, but that
would mean that page 3-63 is wrong.  Can someone enlighten me on what
the intent was?