Hi,
I have this ('scheme emulation') package
> (defpackage :mine
> (:use :cl)
> (:export
> #:define
> #:vector->list
> ...
>
> (in-package :mine)
> ...
> (defun vector->list (vec)
> (coerce (the simple-vector vec) 'list))
>
>
On importing, I get lots of warnings like:
STYLE-WARNING: redefining VECTOR->LIST in DEFUN
This is in SBCL, but presumably I am doing something namespace related
that is general bad style. .... is it evident what is wrong?
Thanks for any help
In article <····························@foreverorg>,
cerios <········@forever.org> wrote:
> Hi,
>
> I have this ('scheme emulation') package
>
> > (defpackage :mine
> > (:use :cl)
> > (:export
> > #:define
> > #:vector->list
> > ...
> >
> > (in-package :mine)
> > ...
> > (defun vector->list (vec)
> > (coerce (the simple-vector vec) 'list))
> >
> >
>
> On importing, I get lots of warnings like:
What do you mean by 'importing'? Which operation are you using?
> STYLE-WARNING: redefining VECTOR->LIST in DEFUN
>
> This is in SBCL, but presumably I am doing something namespace related
> that is general bad style. .... is it evident what is wrong?
>
> Thanks for any help
--
http://lispm.dyndns.org
cerios <········@forever.org> writes:
> Hi,
>
> I have this ('scheme emulation') package
>
>> (defpackage :mine
>> (:use :cl)
>> (:export
>> #:define
>> #:vector->list
>> ...
>>
>> (in-package :mine)
>> ...
>> (defun vector->list (vec)
>> (coerce (the simple-vector vec) 'list))
>>
>>
>
> On importing, I get lots of warnings like:
> STYLE-WARNING: redefining VECTOR->LIST in DEFUN
>
> This is in SBCL, but presumably I am doing something namespace related
> that is general bad style. .... is it evident what is wrong?
>
> Thanks for any help
I suppose that you get these warnings not the first time you are
importing something, but during development when you change the
functions and reload/recompile. In this case, SBCL simply wants to
tell you that you have redefined a previously existing function, in
case you didn't want to do that. If that's the case, you can ignore
it.
I find that SBCL is really picky and gives a lot of warnings, but I
have learned to appreciate them. Wait until you run into defconstant,
though ;-) [1]
HTH,
Tamas
[1] http://www.sbcl.org/manual/Defining-Constants.html