2020-04-04 13:25:09 UTC
standard-accessor-method, and standard-writer-method. But I can't
imagine how these could be used to modify standard behaviour - is there
an example or was there a use case in mind when this was specified?
I think I have a use case for wanting to "augment" the behaviour of all
accessors (readers and writers) which are specified for a certain class.
I don't want to go through s-v-u-c - but only want the "augmenteded
behaviour" for those accessors which declared/defined by the users of
I understand I can subclass standard-reader-method and
standard-writer-method (say with x-reader-method x-writer-method),
define a suitable metaclass x define the methods reader-method-class and
writer-method-class on x to return x-reader-method and x-writer-method.
Then the accessor methods are instances of my x-reader-method and
x-writer-method. But how would I use these meta objects?
I thought perhaps make-method-lambda (say specialized on
standard-generic-function and x-writer-method) could be used to inject
some code into all methods, but this would never get called as there is
no defmethod involved.