16 Nov
2010
16 Nov
'10
8:58 p.m.
On Tue, Nov 16, 2010 at 2:22 AM, Pascal Costanza <pc@p-cos.net> wrote:
Note that it is always possible to have several accessors with different names. So you could define something like this:
(defclass foo () ((some-slot :reader official-slot-reader :accessor %internal-slot-accessor) ...))
I like this, actually, because it warns the reader that although the slot is not to be written by clients, it may nonetheless change; the client mustn't assume it's constant. Personally I think this is better than using SLOT-VALUE, unless the only time it's written is for initialization. -- Scott