Re: Problem with the MOP
Pascal Costanza <costanza <at> web.de>
2004-07-02 23:56:44 GMT
On 2 Jul 2004, at 11:52, Christophe Rhodes wrote:
> In general, sadly, questions that are formulated like this about the
> MOP will tend to be answered by "I don't know". The MOP specification
> is, well, not terribly tight; furthermore, the specification and the
> implementation written by the same people diverge in behaviour... and
> (with one possible exception, but I don't think he reads this list,
> and in any case he's been inactive for quite a while) the cmucl/sbcl
> community contains no MOP experts. (For more evidence of this, see my
> replies to Edwin M Westbrook of yesterday on sbcl-devel).
OK, sorry about that.
> So, that said, what would greatly assist in this kind of discussion is
> a slightly more precise problem description.
OK, I have hacked around a bit, and I think I can provide a better
question. In fact, I think I have detected a bug. Here is the code:
(defmethod compute-discriminating-function
((gf special-generic-function))
(let ((dfun (call-next-method))
(dynamic-scope-prototype (class-prototype (dynamic-scope gf))))
(lambda (&rest args)
(declare (dynamic-extent args))
(apply dfun dynamic-scope-prototype args))))
I have checked the MOP specs, and this should work. (The MOP explicitly
states that one can override compute-discriminating-function, which
(Continue reading)