On Sat, Feb 10, 2007 at 11:01:17PM +0000, Christophe Rhodes wrote:
> Edi Weitz <edi@...> writes:
> > Suppose I have this in a Lisp source file:
> > (defun foo (x y)
> > (+ x y))
> > (defun bar (x)
> > (foo x))
> > If in SLIME I press C-c C-c (slime-compile-defun) for the first and
> > then for the second definition, I don't get any warnings. Is that on
> > purpose? Wouldn't it be nice if SBCL warned about the wrong number of
> > arguments for FOO in BAR's definition like, say, LispWorks does?
> I don't know. On the one hand, this is usually a programmer error.
> On the other hand, it is explicitly not an error until BAR is called,
> and even then only if BAR has not been redefined in the meantime.
It looks to me as though ANSI "3.2.5 Exceptional Situations in the
Compiler" effectively forbids us from giving a full WARNING but
encourages us to give a STYLE-WARNING...
> If, instead of doing C-c C-c or entering individual forms at the repl,
> you compiled the file containing your two forms (as you say you have a
> file), then SBCL will give you the warning, as under those
> circumstances SBCL is allowed to assume that the call to FOO within
> BAR always refers to the FOO defined in the same file (see CLHS
...except, yes, full WARNING seems appropriate when compiled in the
William Harold Newman <william.newman@...>
PGP key fingerprint 85 CE 1C BA 79 8D 51 8C B9 25 FB EE E0 C3 E5 7C
"Faced with the choice between changing one's mind and proving that there is no
need to do so, almost everybody gets busy on the proof." -- J. K. Galbraith