[Openmcl-devel] how to ignore this warning? - shadows standard CL definition.

Pascal Costanza pc at p-cos.net
Sun Apr 15 10:26:37 PDT 2012


What you call "shadowing" is actually redefinition. The standard Common Lisp definitions can normally not be redefined like this. However, they can indeed be shadowed, where "shadowing" means: The same names can be reused for symbols in your own user-defined package, and then you use those symbols instead of the original Common Lisp symbols. If you want to do this, you need to understand how the symbols and the package system in Common Lisp work.

The best description, in my opinion, is still the one in CLtL2: http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node111.html

This is probably already sufficient, but you may also want to check the relevant entry in the HyperSpec afterwards as well: http://www.lispworks.com/documentation/HyperSpec/Body/11_.htm

[CLtL2 was published before ANSI Common Lisp got finalized, so there is a chance that some minor details differ between CLtL2 and the HyperSpec - the HyperSpec is always the more current, correct description, but the presentation in CLtL2 is usually easier to understand.]

I hope this helps,

On 15 Apr 2012, at 19:15, 박성민 wrote:

> I update to  1.9-dev-r15327M-trunk  (DarwinX8664)!.
> I sometime shadow standard cl function.
> for example..
> (defmethod plus ((p1 number) (p2 number))
>   (+ p1 p2))
> (defmethod plus ((p1 string) (p2 string))
>   (concatenate 'string p1 p2))
> (labels ((+ (&rest rest)
> 	   (reduce #'plus rest)))
>   (+ "clozure" " common" " lisp"))
> ;Compiler warnings :
> ;   In an anonymous lambda form: Local function or macro name + shadows standard CL definition.
> => "clozure common lisp"
> if I can ignore it, tell me what to do....    thank you.
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel

Pascal Costanza

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20120415/64fcabdc/attachment.htm>

More information about the Openmcl-devel mailing list