Question about declare-top



Nikodemus Siivola wrote:
...

> However, to keep things sane for the reader, I'd really really recommend
> declaring X special in BAR as well. Unless it is globally special, that is.

I agree.
.........
> 
> So, unless there is some fantastic reason to do otherwise (I admit that 
> maintaining something the size and age of Maxima probably qualifies as 
> this fantastic):
> 
>   (defun bar () (declare (special x)) x)
> 
> is the way to read a locally special variable.
> 


Yes.

In fact I rarely use (declare (special....))

I do use defvar  and defparameter,  each of which set up a binding
and a global name which is also special.

Since all the binding in Macsyma as written in Maclisp was originally
dynamic (i.e. special) when interpreted, but not when compiled (unless
declared special), there were painful incompatibilities when debugging,
as well as potentially mysterious interactions between functions which
accidentally manipulated variables with accidentally identical names.

Getting Macsyma to run under Common Lisp meant that Bill Schelter
had to overcome this difference.  (The Symbolics people had to do
something similar, presumably.)

RJf