[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue DEFCONSTANT-NOT-WIRED (V2)



> Does this mean I can do:
> 
> (defvar *mumble*)
> (defun foo ()
> 	(setq *mumble* :bar)
> 	(proclaim '(constant *mumble*)))
> (defun bar ()
> 	(setq *mumble* :foo))
> 
> then
> (foo)
> :bar
> (bar)
> ERROR...
> 
> vs.
> (bar)
> :foo
> (foo)
> :bar
> (foo)
> ERROR...

Evaluated code might behave this way, but there would be no error in
compiled code because the PROCLAIM was not executed until after both
functions were compiled.  This isn't any different from embedding any
other kind of PROCLAIM in a function.  Maybe the proposal needs to make
clear that the error on a SETQ is expected to be reported by the
compiler, not at run time.