[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Class Redefinition
- To: common-lisp-object-system@SAIL.STANFORD.EDU
- Subject: Class Redefinition
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Mon, 27 Jul 87 12:58 EDT
- In-reply-to: The message of 24 Jul 87 19:45 EDT from Dick Gabriel <RPG@SAIL.STANFORD.EDU>
Date: 24 Jul 87 1645 PDT
From: Dick Gabriel <RPG@SAIL.STANFORD.EDU>
....
Something like this should work:
(let
((obsolete-class (class-named 'heh-heh))
(new-class (make-instance 'standard-class ...))) ;make an anonymous class
;that is the new HEH-HEH
(add-method
#'class-changed
(make-method ;later, make-instance
()
`(,obsolete-class ,new-class)
#'...))
(name-that-class new-class 'heh-heh)) ;Hm, what is this function?
This doesn't conform to 87-002's specification that redefining a class
updates the existing class object, rather than replacing it with a new
class object. Indeed, if we changed that, we wouldn't need the concept
of "obsolete classes", as I pointed out in my message of early Saturday
morning (sent after you wrote this message, but before I saw your message;
we've had a lot of network problems lately, first with window-caulkers
parking their scaffolding in the middle of the through-the-air segment
of our network for a week, then MIT air conditioning failure, and who
knows what else.) However, because methods are classified by class
objects rather than class names, replacing the old class object with a
new one has its own complexities.