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

Re: Various Topics Discussed Last Week



  [Should the name of this option be :DEFAULT-INITARGS or
:DEFAULT-INITARG ?]
:DEFAULT-INITARGS to emphasize that it is a list, each of which itself
is a DEFAULT-INITARG.

JAK   Something needs to be said here about the case where
        a user writes a :BEFORE method and SETF's the slot there. From
        the rest of the text, it sounds as if INITIALIZE-INSTANCE is
        permitted to clobber that slot.

Moon: I think that's what we agreed to at the meeting a couple weeks
ago.

JAK    This makes :BEFORE methods on INITIALIZE-INSTANCE less then
useful
       for slot initialization. The result requires either that 
       INITIALIZE-INSTANCE be singled out in a particular way to
prohibit
       :BEFORE methods, or allows the system to arbitrarily clobber
something
       the programmer has done.

Moon:  I agree with you.

First, the clobbering is not arbitrary, but a well defined part of the
interface.  Second, It is easy for a :BEFORE method to get around this
by simply side-effecting the initarg list, as well as by doing its setf.
Programmers using method combination always have to take into account
the contract of methods they are combined with, or possibly lose.  I
don't see this as any worse than:
   JAK   Users redefine these qualified methods
    at their own peril, as is the case with redefining any system
defined
    method (or function for that matter).
I guess the upshot is that I am not uphappy for users using :BEFORE
methods, since they can achieve the results they want easily, and can
know the effect of their programs.