[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: with-slots and specialized
- To: firstname.lastname@example.org
- Subject: Re: with-slots and specialized
- From: tar@ISI.EDU (Thomas A. Russ)
- Date: 11 Nov 93 09:04:15
- Distribution: world
- In-reply-to: email@example.com's message of 11 Nov 93 11:45:29 U
- Newsgroups: comp.lang.lisp.mcl
- Organization: USC-ISI
- References: <9311111044.AA01460@london>
- Reply-to: firstname.lastname@example.org
In article <...> email@example.com ("Andre Koehorst") writes:
> REGARDING with-slots and specialized setf's If the value of a slot is
> set from within a call to with-slots, before and after methods on
> setf are ignored. This is not the case when the call is from within
> with-accessors. This is very counter-intuitive. But is it a bug?
> CLtL didn't help me very much.
CLtL2, p. 861:
... The macro with-accessors invokes the appropriate accessors to
access the specified slots.
CLtL2, p. 863:
... The macro with-slots translates an appearance of the slot name as a
variable into a call to slot-value.
Since with-slots uses slot value rather than the accessor to gain access
to the slot, the accessor function is never called. That is also why
the before and after methods aren't called.
Thomas A. Russ, USC/Information Sciences Institute firstname.lastname@example.org
4676 Admiralty Way, Marina del Rey, CA 90292 (310) 822-1511x775