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

CLOS slot access

What is the fastest way to do slot accesses in CLOS?
We are using
	(defclass foo ()
	  (slot1 :initform NIL)

	(defmethod bar ((f foo))
	  (clos::with-slots* (slot1) f
	     (setf slot1 3) ; setting
	     (+ 6 slot1)    ; access
>From Gregor's message, I got the impression that this was wrong.  Is there
a better/faster way to access fields of objects?  We are using the
February 3, 1988 release of PCL/CLOS.

Brad A. Myers
Research Computer Scientist
Computer Science Department
Carnegie Mellon University
Pittsburgh, PA  15213
(412) 268-5150