Re: defconstant

[email protected] Wed, 20 May 2026 19:13:16 -0400
Newsgroups gmane.lisp.steel-bank.general
Message-ID <ag5ADCRYifRvwXGT@spot>
On 2026-05-20 at 18:58:43 -0400,
Greg Bennett <[email protected]> wrote:

[...]

> =A0 The constant +ZOT+ is being redefined (from ("a" "b") to ("a" "b"))
> See also:
> =A0 The ANSI Standard, Macro DEFCONSTANT
> =A0 The SBCL Manual, Node "Idiosyncrasies"

[...]

> Is there a way to avoid this situation ?

Don't redefine your constants?  ;-)

Or use Alexandria's define-constant[0].

Or use defparameter instead of defconstant.

IMO, the two references in the error message describe the error fairly
well, at least well enough to made sense to me the first time I ran into
this.

HTH,
Dan

[0] <https://alexandria.common-lisp.dev/draft/alexandria.html#index-define_=
002dconstant>