[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: Raymond Toy
Date: Thu, 24 May 2012 08:58:50 -0700
On Thu, May 24, 2012 at 12:11 AM, Robert Dodier <robert.dodier at gmail.com>wrote:
> On 2012-05-23, Raymond Toy <toy.raymond at gmail.com> wrote:
>
> I replaced some DEFVAR's by DECLARE-TOP because (1) special variables
> are mostly declared by DECLARE-TOP, so in the interest of regularizing
> the declarations, I chose the more popular one, and, more importantly,
> (2) a variable should have only one definition. Otherwise one wonders,
> well, which one is the "real" one? Ugh.
>
I didn't check the diffs in detail, but were some variables defined by both
defvar and declare-top? I prefer defvar because you can add docstring.
Not so easy with declare-top. And aren't some of the same variables listed
in declare-top in multiple files? That sounds like a defvar to me in which
file is compiled/loaded first.
> > declare-top has certain semantics, including being able to declare
> > something as not special. This currently works for most lisps we
> support,
> > but it looks like ccl and abcl have no support for this, so this could be
> > great source of bugs when running maxima with ccl. (There are quite a
> few
> > places with declare-top unspecial.)
>
> The unspecial stuff has no definition for some Lisps, and for the rest
> it doesn't have any useful effect. Unstated goal (3) is to nuke all of
> the unspecial stuff. Who needs the confusion? Just get rid of it.
>
Definitely agree with getting rid of the unspecial stuff. That should be
fairly straightforward since those are obviously intended to be special
only for that part of the file. The question is if you really want to put
a (declare (special foo)) everywhere it's needed.
Ray