[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
defvar, defparameter, :unbound
- To: SOLEY@MIT-MC.ARPA
- Subject: defvar, defparameter, :unbound
- From: Nick Papadakis <isrlist@tove.umd.edu>
- Date: Tue, 5 Nov 85 12:36:00 EST
- Cc: common-lisp@SU-AI.ARPA
- In-reply-to: Richard Mark Soley's message of Sun, 3 Nov 85 10:21:19 EST
I disagree. (defvar foo :unbound), to me, reads "set the value of the
symbol 'foo' to the symbol 'unbound' in the keyword package. I think
(defvar foo) is more readable.
-- Richard
What if you want to use the optional documentation argument, as in
(defvar foo :unbound "I am initially unbound.") ???
How can you document it and yet leave it unbound too?
The problem initially arose when re-writing some code that made heavy
use of
(unless (boundp 'foo) ...
as a means of insuring that variables were initialized. The variables
were NOT initialized in the defvar itself since re-initialization was
frequent and interactive.
- nic