From: Pascal C. <cos...@we...> - 2004-07-22 10:04:16
|
On 3 Jul 2004, at 1:56, Pascal Costanza wrote: > 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 includes modifying the return > value of call-next-method.) In the meantime, I have browsed through the HyperSpec and have found some sections that indicate that a Common Lisp implementation is allowed to reject generic function calls that provide less arguments than the function's lambda list expects. Since there exist good reasons why one would want this, I can't follow that approach anymore. Luckily I have found another way to achieve what I want yesterday, and I am pretty sure that it is more portable than my previous solution. Hopefully, this means that I will be able to release a new version of AspectL that runs on a considerable number of implementations soon. Pascal -- Tyler: "How's that working out for you?" Jack: "Great." Tyler: "Keep it up, then." |