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

Class Redefinition

The problem with class redefinition is that the updating of instances can
be caused by arbitrary events, as far as the user is concerned. If none of
special form FUNCTION, and garbage collection can update instances, then
if a CLOS implementation does not have multitasking, the following will
work (or something like it):

	(let ((obsolete-class (class-named 'heh-heh)))
         (defclass heh-heh ...)
	  (make-method	;later, make-instance
           `(,obsolete-class ,(class-named 'heh-heh))

If there is a CLOS implementation with all of the properties named
above except it does have multitasking (including incremental GC),
then some form or macro like ATOMICALLY wrapped around the above
will work.

Something like this should work:

 ((obsolete-class (class-named 'heh-heh))
  (new-class (make-instance 'standard-class ...))) ;make an anonymous class
                                                   ;that is the new HEH-HEH
  (make-method	;later, make-instance
   `(,obsolete-class ,new-class)
 (name-that-class new-class 'heh-heh))             ;Hm, what is this function?

I think, though, that it probably makes sense to have Danny's version
of GET-OBSOLETE-CLASS for the same reason that I don't like UNIX - it's
too easy to do a DEFCLASS of an existing class and then wish you
had a handle on the old one. I think we need to decide whether Patrick's
versions of getting obsolete classes are worth having around to simplify

I think we forgot to define NAME-THAT-CLASS. It should be the thing such
that MAKE-INSTANCE + (<the thing> <name>) = (DEFCLASS NAME ...).