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

:accessor slot option



I have become uncomfortable with the :reader and :accessor slot options.
Right now, at the very least, I would like to add a :writer option, I
may also want to remove or rename the :accessor option.  The :writer
option would work in the obvious way:

(defclass foo ()
    ((a :reader foo-a
        :writer (setf foo-a))))

This would allow someone who wanted to define a writer but no reader to
do it, it also makes the mapping onto the new setf proposal more
explicit.

I agree that in cases where you want both a reader and a writer its
probably too verbose, so we probably need to keep the :accessor option,
but what if we renamed it, maybe to :reader-writer or perhaps
:accessors.

Or it may just be that re-reading that part of the spec will make me
happy.
-------