[Maxima-commits] Maxima, A Computer Algebra System branch master updated. branch-5_27-base-72-g5287650



On 2012-05-23, Raymond Toy <toy.raymond at gmail.com> wrote:

> Do we really want to replace defvars with declare-top special?  My actual
> (unstated) goal was to get rid of declare-top as much as possible and use
> defvar/defmvar isntead and  try to use *earmuffs* for all speical variables
> when possible.

I'm no big fan of DECLARE-TOP nor of special variables in general. My
unstated goal is to (1) cut out special variables, if any, which need
not be special, and (2) to regularize the names of special variables so
they all have names like $FOO or *FOO*. As preliminary steps towards
these goals, I'm trying to clean up the code somewhat so the remaining
work is clearer.

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.

> 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.

best

Robert Dodier