[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: :accessor-prefix bug



        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