From: Vladimir Zolotykh
Subject: MOP: when to finalize ?
Date: 
Message-ID: <3DAFD4A3.FA8C73B2@eurocom.od.ua>
I defined my own metaclass, say PG-METACLASS. Then used it as
metaclass for some new class like the following

(defclass compound-order ()
  (#|....|#)
  (:metaclass :pg-metaclass))

Some later I'm trying to access COMPOUND-ORDER'S slots with
MOP:CLASS-SLOTS. This gives me the error:

Class #<pg-metaclass compound-order> is not yet finalized.

Normally, MOP:FINALIZE-INHERITANCE is to be done in
(RE)INITIALIZE-INSTANCE specialized on PG-METACLASS for example. Is
this correct ?

At the time I'm doing MOP:CLASS-SLOTS I have no objects of type
compound-order yet. Of course, I could create a temporary one to force
INITIALIZE-INSTANCE to be called. Is this OK ? Also I could call
MOP:FINALIZE-INHERITANCE separately. Does MOP say something which one
would be more native in this case ?

I'm using ACL62.

-- 
Vladimir Zolotykh
From: Gerd Moellmann
Subject: Re: MOP: when to finalize ?
Date: 
Message-ID: <86zntbx40f.fsf@gerd.free-bsd.org>
Vladimir Zolotykh <······@eurocom.od.ua> writes:

> Normally, MOP:FINALIZE-INHERITANCE is to be done in
> (RE)INITIALIZE-INSTANCE specialized on PG-METACLASS for example. Is
> this correct ?

From AMOP:

  The exact point at which finalize-inheritance is called depends on the
  class of the class metaobject; for standard-class it is called
  sometime after all the classes superclasses are defined, but no later
  than when the first instance of the class is allocated (by
  allocate-instance).

> Also I could call MOP:FINALIZE-INHERITANCE separately. Does MOP say
> something which one would be more native in this case ?

Hm, it says FINALIZE-INHERITANCE finalizes, and if you don't need
an instance...