[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mysterious declarations off in left field
- To: Kent M Pitman <KMP@SCRC-STONY-BROOK.ARPA>
- Subject: mysterious declarations off in left field
- From: "Scott E. Fahlman" <Fahlman@CMU-CS-C.ARPA>
- Date: Mon, 06 May 1985 00:38:00 -0000
- Cc: Common-Lisp@SU-AI.ARPA
- In-reply-to: Msg of 5 May 1985 19:30-EDT from Kent M Pitman <KMP at SCRC-STONY-BROOK.ARPA>
- Sender: FAHLMAN@CMU-CS-C.ARPA
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.