Three more MOP problems
Hi, I have encountered three more MOP problems. You already state in the documentation that you implement make-method-lambda differently - it accepts a different argument than specified in AMOP. However, you also don't seem to use it correctly in defmethod. The AMOP specifies that the second value returned by make-method-lambda is a property list that specifies keyword/value pairs to passed to the corresponding make-instance call. This is roughly what should happen: (let ((method (multiple-value-bind (method-lambda method-initargs) (make-method-lambda generic-function (class-prototype (generic-function-method-class generic-function)) lambda-list declarations body environment) (apply #'make-instance (generic-function-method-class generic-function) :function (enclose method-lambda environment) (append initargs method-initargs))))) ;; this ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ is missing! (add-method generic-function method)) This would allow passing information from one's own make-method-lambda specializations to initialize-instance methods for one's own method classes. (The workaround is to bind this information to special variables, but this isn't nice because it works essentially only by providing one's own defmethod macro.) It would be great if you could make this work. The next thing is that you state that you don't implement compute-applicable-methods-using-classes. However, the interesting thing about compute-applicable-methods-using-classes is not to be able to call it, but to provide new methods for it for one's own generic function classes. The AMOP states in some detail how c-a-m-u-c and compute-applicable-methods depend on each other and under what circumstances the result of c-a-m-u-c is cached. I think it is important to know whether and when this kind of caching takes place for c-a-m internally in your MOP in order to be able to specialize c-a-m correctly. (I haven't run into any real problems here because it turned out that implementing methods for those functions was the wrong thing to do in my case, but I have noticed this problem anyway.) One more thing: You don't implement reader-method-class and writer-method-class or, to be more specific, defclass doesn't call them internally. I need to be able to redefine the method classes for slot accessors and I don't know how to do this without those two generic functions. Again, at least you should document the lack of those. All the best, Pascal -- Tyler: "How's that working out for you?" Jack: "Great." Tyler: "Keep it up, then."