[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Default scope of references
In the LMI Systems that you have the behavior of your test cases is
controlled by the variable
SI::*ALL-FREE-INTERPRETER-VARIABLE-REFERENCES-SPECIAL*, which
defaults to NIL. With this default setting both cases *TEST-1* and
*TEST-2* signal errors as you wish. There was some discussion about
getting rid of this option, or at least defaulting it to T. In
DOE-MACSYMA for example the setting of this variable must be T,
because of the unrestricted use of EVAL in the pattern matcher code.
The VAX-NIL system system took a different tack, prefering to be
somewhat like the usual compiler approach. An undeclared (SETQ FOO
...) will generate a warning, and then a "FOO assumed special." This
also has its drawbacks.
There is the issue of how correct to be vs how much trouble to
cause users with old habits. Many users of the LMI system set the
variable controlling the behavior to T. Your reported results are not
consistent with the behavior of LMI systems in either setting. Both
variable reference and variable setting are caught, but you report
that variable setting is not caught. Perhaps you evaluated (SET-FOO)
in a lisp-listener instead of as (EVAL '(SET-FOO)). These have
different behaviors because the system is trying to be more forgiving
to top-level calls than to constructs inside programs.
-gjc