I want to use constant variables in case macro as "Common Lisp Recipes" book recommends.
- 10-2. Using Constant Variables as Keys in CASE Macros
Unfortunately it doesn't work in Clozure CL.
(defpackage #:foo (:use #:cl)) (in-package #:foo) (defconstant +one+ 1) (defconstant +two+ 2) (defun lol (gg) (ecase gg (#.+one+ :one) (#.+two+ :two))) This code fails to load.
Unbound variable: FOO::+ONE+ [Condition of type UNBOUND-VARIABLE] Restarts: 0: [CONTINUE] Retry getting the value of FOO::+ONE+. 1: [USE-VALUE] Specify a value of FOO::+ONE+ to use this time. 2: [STORE-VALUE] Specify a value of FOO::+ONE+ to store and use. The code works fine in SBCL. Why doesn't it work in CCL?
I am using 64 bit Clozure CL 1.12 on macOS.