common lisp - "constant is being redefined" with defconstant? -


i'm reading chapter 5.2 of paip. , when try define constant using following form, taken book, error shown below. i'm using sbcl 1.1.14.debian interpreter. doing wrong?

(defconstant no-bindings '((t . t))   "indicates pat-match success, no variables.") 

the constant no-bindings being redefined (from (t t) ((t . t)))

a constant per spec value not suppose changed.. should use absolute certainties (defconstant +pi+ 3.1415927).

in practice it's changeable, every function or macro has been used might have taken advantage of being constant , compiled in actual value changing won't affected those. changing constant should done complete recompile/reload of make make sure it's updated.

for values considered constant might change, use defparameter. eg. (defparameter *no-bindings* '((t . t)) "indicates pat-match success, no variables.").


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -