Open Ambrevar opened 5 years ago
I wanted to have defvar
, but the semantics of a global defvar
can't be fully imitated by a local binding. You can make a symbol locally special (using (declare (special ...))
, but that binding is only visible in the dynamic environment of called functions if they opt in with a special
declaration of their own.
Note that def
is supported globally, so it is (at least) consistent.
What about defparameter?
Same problem, alas.
The
local
macro supportsdefun
, etc. but surprisingly it does not supportdefvar
. Instead, the user must usedef
.I wonder why that is. Wouldn't that trip the user? Why not supporting
defvar
for consistency?