[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: Andreas Eder
Date: Wed, 23 May 2012 20:38:49 +0200
>>>>> "Raymond" == Raymond Toy <toy.raymond at gmail.com> writes:
Raymond> On Wed, May 23, 2012 at 8:31 AM, Robert Dodier
>> commit 0917e90a6f760a7bb8b93002e67728b4a572b502
>> Author: robert_dodier <robert_dodier at users.sourceforge.net>
>> Date: Tue May 22 08:02:08 2012 -0600
>>
>> Clean up duplicate special variables.
>>
>> * src/macsys.lisp: replace DEFVAR by (DECLARE-TOP (SPECIAL ...))
>> * src/nparse.lisp: replace DEFVAR by (DECLARE (SPECIAL ...))
>> * src/plot.lisp: replace DEFVAR by (DECLARE-TOP (SPECIAL ...))
>> * src/rat3e.lisp: replace DEFVAR by (DECLARE (SPECIAL ...))
>> * src/simp.lisp: cut out DEFVAR (variable not used in src/simp.lisp)
>> * src/simp.lisp: replace DEFMVAR by (DECLARE-TOP (SPECIAL ...))
>> * src/spgcd.lisp: cut out DEFVAR (variable already declared special)
>> * src/trigi.lisp: replace DEFVAR by (DECLARE-TOP (SPECIAL ...))
>>
Raymond> Do we really want to replace defvars with declare-top special? My actual
Raymond> (unstated) goal was to get rid of declare-top as much as possible and use
Raymond> defvar/defmvar isntead and try to use *earmuffs* for all speical variables
Raymond> when possible.
Raymond> declare-top has certain semantics, including being able to declare
Raymond> something as not special. This currently works for most lisps we support,
Raymond> but it looks like ccl and abcl have no support for this, so this could be
Raymond> great source of bugs when running maxima with ccl. (There are quite a few
Raymond> places with declare-top unspecial.)
I'm also much in favour of eliminating any use of 'declare-top'. It does
not have consistent semantics over all supported lisps and overall make
the code a lot harder to understand.
I am with Raymond here. We should try to go in the other direction and
replace all uses of 'declare-top' with 'defvar' and use *earmuffs*
whenever possible.
Andreas
--
ceterum censeo redmondinem esse delendam.