Subject: Re: Inherited shared slots
From: Erik Naggum <clerik@naggum.no>
Date: 1998/04/15
Newsgroups: comp.lang.lisp
Message-ID: <3101601770297297@naggum.no>


* Erann Gat
| Almost.  In also want a second class, baz, that inherits from foo
| to have a shared slot that is distinct from the one shared by all
| instances of bar.  i.e. if I do:
| 
|   (defclass baz (foo) ())
| 
| then
| 
|   (eq (setf (slot-value (make-instance 'baz) 'zot) (cons nil nil))
|       (slot-value (make-instance 'bar) 'zot))
| 
| should return nil.

  continuing the example,

(defclass baz (foo)
  ((zot :allocation :class :initform ())))

  should do that.

#:Erik
-- 
  religious cult update in light of new scientific discoveries:
  "when we cannot go to the comet, the comet must come to us."