[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: :accessor-prefix bug
- To: Rick.Busdiecker@cs.cmu.edu
- Subject: Re: :accessor-prefix bug
- From: Gregor.pa@Xerox.COM
- Date: 29 Sep 87 22:00 PDT
- Cc: CommonLoops.PA@Xerox.COM
- In-reply-to: Rick.Busdiecker@H.GP.CS.CMU.EDU's message of 29 Sep 87 18:20 EDT
From: Rick.Busdiecker@H.GP.CS.CMU.EDU
Date: 29 Sep 87 12:20 PDT
From: Gregor.pa@Xerox.COM
Subject: Re: :accessor-prefix bug
NOTE: we decided last week to remove the :accessor-prefix
and :reader-prefix options from defclass. This means that you
will have to start using just :accessor and :reader.
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
* intern the new symbols in the package of the slot-name
- this is often not what you want. If you have a slot named list, and
a prefix of foo-, and your program is in your own package, you probably
want the symbol to be my-package::foo-list not lisp::foo-list
* intern the symbols in the package of the prefix symbol
- often, this is likely to solve the problem presented in the second
bullet, but it won't work in general and is kind of a crock.
Note that we also got rid of the :prefix option to with-slots for
basically the same set of reasons.