[pro] AMOP question: When and where is slot-value-using-class called?
Pascal Costanza
pc at p-cos.net
Sat Aug 2 11:38:22 UTC 2014
On 2 Aug 2014, at 06:35, Jean-Claude Beaudoin <jean.claude.beaudoin at gmail.com> wrote:
> I think I found the subsection you refer to: AMOP 5.3.1 (pp. 142-144) "Implementation and User Specialization", which contains two sub-subsections with titles starting with "Restrictions on".
> I will try to decipher those and their implications now that I have renewed motivation to do so.
There are similar restrictions defined in http://www.lispworks.com/documentation/HyperSpec/Body/11_abab.htm - bullet 19.
It is in general a good idea when defining methods that at least one of the specializers should only match instances of your own classes. (The phrasing “your own” is a bit ambiguous here, but I believe it should be clear what is meant.)
This is a good rule of thumb because this ensures that when using different libraries in a project, they won’t step on each other’s toes. This doesn’t mean there can’t be exceptions to this rule, but if you break it, you should better document it well and be aware of the potential implications.
Pascal
--
Pascal Costanza
The views expressed in this email are my own, and not those of my employer.
More information about the pro
mailing list