OK, full details. I am main developer of computer algebra
system FriCAS (which is a fork of Axiom). Largest part of
FriCAS is written in Spad, which is strongly typed language
translated to Lisp. Slightly smaller part is written
in Boot which is a syntactic sugar over Lisp or in Lisp
directly. In principle Lisp code generated from Spad
should be free of type errors and some other factors
make other types of runtime errors less likely.
FriCAS may be used to perform rather heavy computations,
so optimization for speed is desirable. Real code
always have bugs so by FriCAS is normally compiled
using default Lisp compiler setting, which in most
cases gives reasonable speed and enough safety to
debug when problems show up. However, users requested
way to control speed/safety compiler settings.
In particular they wanted to be able to compile
Spad files at lower safety settings than rest of
sources. Given that users may know nothing about
Lisp whole business of declaring/proclaiming things,
calling compile etc, must be done by FriCAS.
The first implementation of the feature stored
desired setting in variable and then used 'proclaim'
inside a 'locally' form to apply the settings. But
of course it did not work as intended, 'locally'
had no effect and setting were changed globally,
at least potentially affecting more files then wanted.
I considered wrapping whole content of generated file
into a 'locally' with proper declarations, but that
is unattractive because currently once generated
Lisp files can be reused, but putting declarations
inside files would made reuse harder.
--
Waldek Hebisch
heb...@math.uni.wroc.pl