[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Name That Class!
- To: RPG@SAIL.STANFORD.EDU
- Subject: Re: Name That Class!
- From: Gregor.pa@Xerox.COM
- Date: 1 Sep 87 10:11 PDT
- Cc: Common-lisp-object-system@SAIL.STANFORD.EDU
- In-reply-to: Dick Gabriel <RPG@SAIL.STANFORD.EDU>'s message of 30 Aug 87 20:24 PDT
Your first example is right. But there is a mistaken assumption in your
second example that throws all the others off. Specifically, you say
that:
It seems that (DEFLCASS FOO ...)
is equivalent to
(let ((c (make-instance 'standard-class))) (setf
(<various aspects> c) <certain values>) (setf (class-named
'foo) c) c)
But this isn't right. (defclass foo ...) is equivalent to:
(let* ((existing (class-named 'foo t))
(new (if existing
(class-for-redefinition existing)
(make-instance 'standard-class))))
(setf (class-named 'foo) new)
(update-class new ..)
new)
Given this clarification, its clear that (for instances of
standard-class) the rest of your examples should return:
2. T
3. T
4. T
The point is that class-named has no smarts (remember that as much as
possible we don't want to do things that just couldn't map into a
Lisp-1, and certainly set! has no smarts). class-for-redefinition is
where all the smarts is.