[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

defvar, defparameter, :unbound



   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