[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Multiple keywords in make-instance
- To: commonloops.pa@Xerox.COM
- Subject: Multiple keywords in make-instance
- From: Timothy.Freeman@theory.cs.cmu.edu
- Date: Sun, 30 Aug 87 16:51:46 EDT
- Redistributed: commonloops.pa
If I do (make-instance 'foo :x 3 :x 4), and x is a slot in instances
of the class foo, should the slot be given the value 3 or 4?
For the version of PCL that I'm using now (4/29/87 prime), the slot
gets 4. Is this also the case for more recent versions of PCL?
According to CLtL, if make-instance were a function that takes a
keyword argument X, the X parameter to make-instance would be 3.
(Page 62, "If more than one such argument pair matches, it is not an
error; the leftmost argument pair is used.")
I think that PCL should deal with the keyword arguments to
make-instance the same way that lisp deals with keyword arguments to
functions. That way, if I want to write a piece of code that looks at
keyword lists, I can use the same code for both the keyword lists
passed to make-instance and the keyword lists passed to other
functions.