[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue: DEFSTRUCT-SLOTS-CONSTRAINTS-NAME , Version 4
- To: goldman@vaxa.isi.edu
- Subject: Re: Issue: DEFSTRUCT-SLOTS-CONSTRAINTS-NAME , Version 4
- From: masinter.pa@Xerox.COM
- Date: 13 Jan 89 11:03 PST
- Cc: cl-cleanup@sail.stanford.edu
- In-reply-to: goldman@vaxa.isi.edu's message of Thu, 12 Jan 89 15:36:28 PST
If you have two slots with the same name in different packages, then the
slot accessor name for the slots will be the same; while the :conc-name and
the value of *package* come into play, the symbol-name of the slots is the
only part that is used to distinguish one slot from another.
If you had duplicate names, which slot would the accessor refer to? E.g.,
(defstruct (foo (:constructor (create-foo (bar:a baz:a))))
bar:a baz:a)
Then what is
(foo-a (create-foo 1 2))?
Is it 1 or 2?
We were unable and unwilling to specify its effects. Unable because there
was no good reason to choose one over the other. Unwilling because there is
now, in the language, a reasonable way of specifying unambiguously exactly
what you want, by giving a DEFCLASS in the structure-class.