[slime-devel] Re: the slime inspector

Pascal J.Bourguignon pjb at informatimago.com
Mon Sep 13 14:54:52 UTC 2004


Martin Simmons writes:
> >>>>> On Mon, 13 Sep 2004 09:14:19 +0200, "Pascal J.Bourguignon" <pjb at informatimago.com> said:
> 
>   Pascal> Peter Seibel writes:
>   >> > - figure out how to distinguish between a defvar/defparameter and
>   >> >   defcontstant symbol.
> 
>   Pascal> This should be implementation dependant.
>  
>   >> How about CONSTANTP?
> 
>   Pascal> CONSTANTP does not do what you think!
> 
>   Pascal> [22]> (defvar x 1)
>   Pascal> X
>   Pascal> [23]> (defvar c 1)
>   Pascal> C

Ooooops. I thought really very strongly DEFCONSTANT, but I forgot to
activate the telephatic module of my computer :-(

[32]> (defconstant c 1)
C
[33]> (constantp 'c)
T
[34]> (constantp 'x)
NIL

> Is the above really the output from a running Common Lisp, with CONSTANTP
> returning both T and NIL for the symbol X?  Was C supposed to be DEFCONTSTANT?
> 
> Maybe you didn't type what you think :-)

Indeed. Sorry.  So CONSTANTP can be used.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

Our enemies are innovative and resourceful, and so are we. They never
stop thinking about new ways to harm our country and our people, and
neither do we.




More information about the slime-devel mailing list