[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mysterious declarations off in left field
Or SPECIAL! I've already had problems in Macsyma source code with closures
that didn't "close" because someone decided STRING should be a special variable.
Well, in any future MACSYMA, that special would be named *STRING* and
would therefore be harmless, assuming that the author of the code
follows the suggested conventions. Quick conversions of old code are
unlikely to observe such restrictions, however, and for compatibility
reasons we stopped short of actually requiring specials to have funny
names or funny syntax around them.
Actually, I wonder if we shouldn't have said that type proclamations
should pertain only to special variables. eg,
(PROCLAIM '(TYPE FLOAT TOLERANCE))
might have only applied to special occurrences of TOLERANCE. This would
mean that people using variables lexically in other modules would be far
less likely to find irrelevant declarations affecting them...
I think we did say that. The description of (PROCLAIM '(TYPE ...)) on
page 156 says that "any variable names mentioned are assumed to refer to
the dynamic values of the variable. So a lexical binding of TOLERANCE
would not inherit this type restriction.