[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: :accessor-prefix bug
- To: CommonLoops.PA@Xerox.COM
- Subject: Re: :accessor-prefix bug
- From: Rick.Busdiecker@H.GP.CS.CMU.EDU
- Date: 30 Sep 87 11:10 EDT
- Redistributed: CommonLoops.PA
- Reply-to: Rick.Busdiecker@cs.cmu.edu
Why? Is there some benefit that out-weighs the added verbosity?
Yes, because these options had to call intern in order to work, and
there we a number of problems about what package the constructed symbol
should be interned in. The 3 proposed solutions all had problems.
Specifically:
* intern the new symbols in the value of *package* at the time the
defclass form is processed.
- this is problematic because *package* is a special variable and under
certain circumstances this can lead to surprising behavior
I would think that the correct Common Lisp way to deal with the
question would be to handle it the same way that defstruct handles
conc-name. This first proposal seems like the right way to go. Are
the certain circumstances that you mention also problematic for
defstruct, or are the problems unique to defclass?
Note that we also got rid of the :prefix option to with-slots for
basically the same set of reasons.
I think that that makes with-slots into a truly dangerous form.
Code that uses with-slots without the :prefix can be broken by adding a
slot to the class definition.
Rick