(defclass a()
((name :accessor get-name)))
(defclass b(a)
((name :accessor get-name)))
if i define two classes like the above,
the symbol get-name holds how many sets of values for name
>>>>> On 2 Sep 2003 04:39:44 -0700, Venkat ("Venkat") writes:
Venkat> (defclass a()
Venkat> ((name :accessor get-name)))
Venkat> (defclass b(a)
Venkat> ((name :accessor get-name)))
Venkat> if i define two classes like the above,
Venkat> the symbol get-name holds how many sets of values for name
One.
Venkat wrote:
> (defclass a()
> ((name :accessor get-name)))
> (defclass b(a)
> ((name :accessor get-name)))
> if i define two classes like the above,
> the symbol get-name holds how many sets of values for name
Lots:
RCLL(15): (symbol-value 'get-name)
Error: Attempt to take the value of the unbound variable `GET-NAME'.
[condition type: UNBOUND-VARIABLE]
OK, unbound by defining methods, but there is a /place/ there for one value.
RCLL(17): (symbol-plist 'get-name)
NIL
That's one. A little sparse just now, but you could store as much as you
like in that plist.
RCLL(16): (symbol-function 'get-name)
#<STANDARD-GENERIC-FUNCTION GET-NAME>
There's another, and maybe this is what you were asking, but then
(depending on your implementation's support for the MOP
(http://www.alu.org/mop/index.html)) look at:
(generic-function-methods #'get-name)
=> (#<STANDARD-READER-METHOD GET-NAME (B)>
#<STANDARD-READER-METHOD GET-NAME (A)>)
That info is not like the other symbol values, but maybe you were trying
to get at this, so I threw it in.
--
kenny tilton
clinisys, inc
http://www.tilton-technology.com/
---------------------------------------------------------------
"Career highlights? I had two. I got an intentional walk from
Sandy Koufax and I got out of a rundown against the Mets."
-- Bob Uecker