[Maxima-commits] Maxima, A Computer Algebra System branch master updated. branch-5_27-base-72-g5287650
Subject: [Maxima-commits] Maxima, A Computer Algebra System branch master updated. branch-5_27-base-72-g5287650
From: Steve Haflich
Date: Sat, 26 May 2012 14:35:28 -0700
Raymond Toy <toy.raymond at gmail.com> wrote:
If you (declare (special *foo*)) (at top level),
This is not legal CL, since DECLARE can only be used at the head of a
specific set of operators. DECLAIM is probably what you want.
doesn't that make *foo* special for all files compiled after this?
This also isn't quite right. At compile-file time the declamation will
be in effect for the duration of the file compilation (and perhaps for
the dynamic extent of the outermost with-compilation-unit, if there is
one) but the semantics of declaim and eval-when mean that the special
declamation may expire at the end of compilation, at which time the
compile-file environment evaporates. Of course, if the compiled file is
then loaded, the declamation comes into effect pervasively and
permanently.
I can't remember if this is
how it works, but if so, then that's the same as (defvar *foo*).
Yes, the behavior should be essentially the same as a one-subform
defvar, other than any source file recording or other extra-ANS side
effects of defvar.