[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CLOS slot access
- To: commonloops.pa@Xerox.COM
- Subject: CLOS slot access
- From: Brad.Myers@a.gp.cs.cmu.edu
- Date: Tue, 28 Jun 88 12:48:18 EDT
- Cc: bam@a.gp.cs.cmu.edu
- Redistributed: commonloops.pa
What is the fastest way to do slot accesses in CLOS?
We are using
(defclass foo ()
(slot1 :initform NIL)
....
)
(:accessor-prefix))
(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
bam@a.gp.cs.cmu.edu