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

Re: Making (CLASS-OF <class>) be EQ to <class>



   X-Ns-Transport-Id: 08002008D0FD00027DCC
   Date: 	Tue, 25 Sep 1990 11:14:12 PDT
   From: Jon L White <jonl@lucid.com>

   3. Have we adequately enumerated in a single place the kinds of system
      definitions that user code can redefine without suffering  "undefined 
      consequences"; e.g., are SETF function names and methods covered?

   (and, from a previous message)

	(METHOD CHANGE-CLASS (STANDARD-OBJECT))			;sure
        (METHOD SHARED-INITIALIZE :AFTER (STANDARD-CLASS)) 	;maybe?

The newest MOP document, draft 11 of July 30, lays out the necessary
restrictions for part of this in some detail.  It doesn't address the
issue of non-symbol function names, but that one is easy.  It does focus
on the issue of what method definitions it is legal for users to do.

The short answer is that it isn't possible for a user to do either of
the method definitions you list.



   2. If there are methods defined on function FOO at classes respectively
      <C1, C2 ...>, then how can one temporary override the effective method
      at that point, and cause it to defer to the next most specific one?

Without changing the method combination, or the class of the generic
function, you can't.  Two reasons: First, 88-002R CLOS is not one of the
OOLs that supports this sort of thing.  Second, CLOS with MOP, doesn't
provide base-level initiated, runtime reflective incursion.  To do a
reflective incursion such as this one, which gives you
casually-connected access to the method dispatch mechanism, you have to
have expressed your desire to have this control ahead of time.  The way
to do this is to change either the method combination, or the generic
function class.