From: Stephen Ramsay
Subject: sbcl style warnings (lisp newb)
Date: 
Message-ID: <I4yIe.12907$jq.2610@bignews3.bellsouth.net>
I'm new to Lisp (and having a very good time with it), but I am forever
getting style warnings from SBCL.  Most are helpful and easily fixed,
but this one baffles me:

STYLE-WARNING: redefining [whatever] in DEFUN

Perhaps my google-foo is even worse than my lisp-foo, but I can't seem
to find an explanation for what this means -- or what the preferred
style might be.  About all I've been able to find is this from the SBCL
manual:

SBCL gives style warnings about various kinds of perfectly legal code,
e.g.

- multiple defuns of the same symbol in different units;

I'm not sure if that refers to the error I'm getting, but it seems
close.

I'd love a hint . . .

Steve

-- 
Stephen Ramsay
web: http://cantor.english.uga.edu/

From: Lars Rune Nøstdal
Subject: Re: sbcl style warnings (lisp newb)
Date: 
Message-ID: <pan.2005.08.05.00.47.56.294624@gmail.com>
Den Fri, 05 Aug 2005 00:07:04 +0000, skrev Stephen Ramsay:

> I'm new to Lisp (and having a very good time with it), but I am forever
> getting style warnings from SBCL.  Most are helpful and easily fixed,
> but this one baffles me:
> 
> STYLE-WARNING: redefining [whatever] in DEFUN
> 
> Perhaps my google-foo is even worse than my lisp-foo, but I can't seem
> to find an explanation for what this means -- or what the preferred
> style might be.

Like this?


CL-USER> (defun test (x) (* x 2))
test
CL-USER> (test 2)
4
CL-USER> (defun test (x) (* x 3))
style-warning: redefining test in DEFUN
test


The function `test' is now redefined; it's just a "warning" to inform you
of this happening. It's probably not "bad style" when this is actually
what you want:


CL-USER> (test 2)
6


http://www.sbcl.org/manual/Style-Warnings.html#Style%20Warnings

-- 
Lars Rune N�stdal
http://lars.nostdal.org/
From: Stephen Ramsay
Subject: Re: sbcl style warnings (lisp newb)
Date: 
Message-ID: <4xzIe.24460$Mo.13074@bignews5.bellsouth.net>
On 2005-08-05, Lars Rune N�stdal <···········@gmail.com> wrote:
> Like this?
>
>
> CL-USER> (defun test (x) (* x 2))
> test
> CL-USER> (test 2)
> 4
> CL-USER> (defun test (x) (* x 3))
> style-warning: redefining test in DEFUN
> test

Ah, I get it.  That's actually a quite useful warning . . .

Thanks so much for your help!

Steve

-- 
Stephen Ramsay
web: http://cantor.english.uga.edu/
From: Thomas F. Burdick
Subject: Re: sbcl style warnings (lisp newb)
Date: 
Message-ID: <xcv1x58pz7y.fsf@conquest.OCF.Berkeley.EDU>
Stephen Ramsay <·······@uga.edu> writes:

> On 2005-08-05, Lars Rune N�stdal <···········@gmail.com> wrote:
> > Like this?
> >
> >
> > CL-USER> (defun test (x) (* x 2))
> > test
> > CL-USER> (test 2)
> > 4
> > CL-USER> (defun test (x) (* x 3))
> > style-warning: redefining test in DEFUN
> > test
> 
> Ah, I get it.  That's actually a quite useful warning . . .

SBCL's style-warnings don't mean "you have bad style", rather "the
Python compiler has difficulty understanding code written in this
style" and the redefinition warnings.  Python is not lint :-)

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | Free Mumia Abu-Jamal! |
     ,--'    _,'   | Abolish the racist    |
    /       /      | death penalty!        |
   (   -.  |       `-----------------------'
   |     ) |                               
  (`-.  '--.)                              
   `. )----'