Re: CLOS Question - Making an object a constant



skamboj wrote:
Hi,

I am looking for a way to make an instance of a class a constant. Is
there a simple way to do this? Failing which, is there a simple way to
detect all changes to a slot of an object?

The reason that I am asking is that I have a relatively small lisp
application (ten thousand lines of code or so) that is crashing because
of a bug that causes a slot of an object to be modified. That object is
supposed to be a constant once completely initialized. However, I can't
seem to find out the place or function that is changing that slot.

Thanks for any help.

Regards,
Sachin.


You don't use slot-value, right. Then just specify a :reader instead of an :accessor for that very slot. Ok, you've got to use slot-value in the initialization code then .. hmm ... who knows better ways?
.