[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Class redefinition and class-changed.
- To: "David A. Moon" <Moon@SCRC-STONY-BROOK.ARPA>
- Subject: Re: Class redefinition and class-changed.
- From: Patrick H Dussud <DUSSUD%Jenner%ti-csl.csnet@RELAY.CS.NET>
- Date: Tue, 28 Jul 87 15:52:09 CDT
- Cc: common-lisp-object-system@SAIL.STANFORD.EDU
- In-reply-to: Msg of Sat, 25 Jul 87 01:26 EDT from "David A. Moon" <Moon@scrc-stony-brook.arpa>
I don't like Patrick's particular proposal, though.
GET-OBSOLETE-CLASSES-FOR-REDEFINITION is too complicated, because it
returns a whole alist rather than being just the primitive. In addition, I
don't think the set of "classes implicated in the class-redefinition of
CLASS" is computable until the details of the redefinition are known.
(defclass one () (a b))
(defclass two (one) (c))
(defclass three (one) (d))
Now suppose we redefine one as follows:
(defclass one () (a b d))
Referring to the third paragraph on page 1-11 of 87-002, one and two are
"implicated", but three is not, or at least, whether three is implicated is
implementation-dependent. But if the new slot had been named e, both two
and three would have been implicated. I don't think the information in
Patrick's alist is needed anyway; when defining a method, one only defines
it for the obsolete class corresponding to one class. If a different
method needs to be defined for an obsolete subclass, the function can be
I see. I don't care that much about the alist as long as we can get the
obsolete class of "one".
Thus I would replace Patrick's proposal with GET-OBSOLETE-CLASS-FOR-REDEFINITION
which takes one argument, a class, and returns one value, the obsolete class
that is a copy of the current definition of the class and will be used the next
time the class is redefined; this is created the first time you ask for it.
Perhaps GET-OBSOLETE-CLASS-FOR-NEXT-REDEFINITION would be a better name.
As Danny proposed, a primitive to get the obsolete classes corresponding to
redefinitions that have already taken place is useful, for instance in case
you didn't realize ahead of time that you would need a CLASS-CHANGED method
and now want to patch up the program. I would suggest a function
GET-OBSOLETE-CLASSES-FOR-PAST-REDEFINITIONS which takes one argument, a
class, and returns one value, a list of obsolete classes, newest first.
I'll have to think some more about the rest of the message. Our
connection with Arpanet was broken and we got it back just one