[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CLASS-CHANGED and UPDATE-OBSOLETE-INSTANCE
- To: Danny Bobrow <Bobrow.pa@Xerox.COM>
- Subject: Re: CLASS-CHANGED and UPDATE-OBSOLETE-INSTANCE
- From: kempf%hplabsz@hplabs.HP.COM
- Date: Thu, 01 Oct 87 13:44:31 MDT
- Cc: kempf%hplabsz@hplabs.HP.COM, common-lisp-object-system@sail.stanford.edu
- In-reply-to: Your message of 01 Oct 87 11:01:00 -0700. <871001-110144-4013@Xerox>
> One could do the same thing as:
> (defmethod change-class
> ((p1 x-y-point) (class (eql (class-named 'rho-theta-point))))
> (let
> ( (p2 (call-next-method)) )
> (with-slots (p2 rho theta)
> (setf rho (rho p1))
> (setf theta (theta p1)))))
> Two problems with what you say:
> 1) After the call-next-method p1 is EQL to p2, and p1 is no longer an x y poi
nt.
> 2) Even if this worked, it wouldn't work for a subclass of rho-theta point.
Right. It is pretty gross code anyway.