[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue: DEFVAR-INITIALIZATION (Revision 3)
- To: cl-cleanup@SAIL.STANFORD.EDU
- Subject: Issue: DEFVAR-INITIALIZATION (Revision 3)
- From: Masinter.pa@Xerox.COM
- Date: 5 Jun 87 22:42 PDT
- Cc: Masinter.pa@Xerox.COM
This version has revision => version, KMP => Pitman, removal of first
person by deleting "to me".
Status: Version 3 released. Ready for re-release! (no ? about it).
References: DEFVAR (p68)
Edit history: Version 1 by KMP 02/26/87
Version 2 by cleanup committee 15-Mar-87
Version 3 by Masinter (normalize format) 15-Mar-87
Version 4 by Masinter 5-Jun-87
The description of DEFVAR on p.68 is not adequately clear on what
happens if an initialization value is not provided, as in (DEFVAR FOO).
Does this initialize the variable?
If the one-argument form of DEFVAR is used, the value (or lack of value)
of the variable is not changed.
In parent languages to CL, such behavior was documented. The omission of
clear documentation in CL is presumably an accident.
Most implementations already do not initialize the variable. Some
implementations, however, assume that the missing initial value defaults
to NIL and assume that the variable is always to be initialized if
Some implementations suffer a minor incompatible change. The
modification to systems is presumably trivial.
It's sometimes useful to have the ability to initializing it. More
importantly, though, DEFVAR is used by lots of users in every
implementation and it deserves uniform treatment.
It's stylistically poor to be relying on the variable to be initialized
without writing the initial value explicitly anyway. Except for very
rare situations where a conditional action is taken based on a BOUNDP
test of the variable, user programs are unlikely to be affected in
Very few user programs are likely to be affected. The incidence rate is
probably sufficiently low that the issue of automatic tools for
conversion is irrelevant.
No significant issues are obvious.
The cleanup committee supports this clarification.