Re: Special variables!



>>>>> "Camm" == Camm Maguire <camm at enhanced.com> writes:

    Camm> mat.lisp declares 'm special, but never declares it 'unspecial, to it
    Camm> remains special throughout all following files (now that we use oos
    Camm> and not a simple separate compile-file on each as I think Schelter did
    Camm> if memory serves), including nset.lisp, where it governs the arguments

I don't think mk:oos matters.  mk:oos compile-file's each file
separately anyway.

    Camm> of integer-stirling1 among others.  I strongly doubt this is the only
    Camm> case.  What to do?

That's a problem.  What I've done is change some of these special
variables to use the *foo* convention so you know it's special.  Then,
if it is used in many places, I might add a defvar for it instead of
using declare-top special.  If it's only used in one file and only in
a couple of functions, I remove the declare-top and just (declare
(special foo)) in the few functions that need it, so then it's not
globally special.  These changes are pretty scary.  (Did you know that
'var is a special variable?  And so are a, b, and y, I think.)

But for a variable named 'm, it's really, really hard to tell whether
it needs to be special wherever m is used or just in mat.lisp.  You
could just rename it in mat.lisp or in all the other places, and see
what happens.  However, I doubt our testsuite has enough coverage to
even come close to testing these issues.

Ray