1 Feb 2009 23:25
Re: Key argument in defmethod
Liam Healy <lnp <at> healy.washington.dc.us>
2009-02-01 22:25:51 GMT
2009-02-01 22:25:51 GMT
On Sun, Feb 1, 2009 at 12:06 PM, Richard M Kreuter <kreuter <at> progn.net> wrote: > Liam Healy writes: >> I am seeing a style warning when I call a method using a particular >> key argument, :divided-difference. >> I don't understand why. It doesn't happen in CCL. > > Indeed. > >>(lisp-implementation-version) >> "1.0.18.debian" > > The details behavior changed some months ago (probably around 1.0.21 or > '.22), though possibly not in a manner that will help you. The short > story is that if you've executed the relevant DEFMETHODs before > compiling the function call, no warning will be signaled; if you're > compiling the call before adding any method that takes the keyword, you > will still see the warning. (See [1] for a more precise explanation and > rationale for the current behavior.) > > If you can't reasonably execute the DEFMETHODs before compiling the > call, you could alternatively add the explicit keywords or > &ALLOW-OTHER-KEYS to the DEFGENERIC's lambda list. > > [1] http://thread.gmane.org/gmane.lisp.steel-bank.devel/11712 > > -- > Richard > The email link you've provided describes exactly what I am experiencing, so it sounds like an SBCL upgrade will cure the problem. I don't know what you mean by "executed the relevant defmethods before compiling the function call"; at the top of the file is the defmethod, the usage is further down in an example/test, and I get this warning whenever I run the tests or just simply cut and paste the example into a listener after everything is loaded, in any case certainly after the defmethod has been compiled and loaded. This is what I do for some of the other examples (like chebyshev) for which I see no warning. Liam ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword
RSS Feed