Re: Global lexical variables?



Russell Wallace <russell.wallace@xxxxxxxxx> writes:

On Oct 30, 6:31ˇ pm, David Golden <david.gol...@xxxxxxxxxxxxx> wrote:
Yes and no. They're not in the standard directly.

There is, however, a way of emulating lexically scoped globals - without
stepping outside common lisp proper - with symbol-macros. ˇ Usually
referred to as "deflexical" or "deflex" macros.

Thanks! That looks messier than just letting them be dynamic, so I
think I'll just let clisp go ahead and disapprove :-)

Um, if you let them be dynamic, then you can get clisp to not complain
by first declaring them with DEFVAR or DEFPARAMETER. That is normally
what you would want.

What behavior do you anticipate getting from dynamic variables that you
don't want to have?

--
Thomas A. Russ, USC/Information Sciences Institute
.