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
Post a Comment