Subject: Re: FAQ 7.17: How can I access a dynamic variable while a similarly named lexical is in scope?
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 1999/07/18
Newsgroups: comp.lang.lisp
Message-ID: <7msabe$1uda5@fido.engr.sgi.com>
Vassil Nikolov  <vnikolov@poboxes.com> wrote [some useful stuff, then]:
+---------------
| Rob Warnock wrote:
| > So what's wrong with this? Maybe nothing, but... The HyperSpec says that
| > the argument to "symbol-value" (even in the "stef" form) must already have
| > a value.
| 
| What does the CLHS say exactly to that effect?
+---------------

At the beginning of <URL:http://www.harlequin.com/education/books/
HyperSpec/Body/acc_symbol-value.html> it says:

	Accessor SYMBOL-VALUE 
	Syntax:
	symbol-value symbol => value
	(setf (symbol-value symbol) new-value)

	Arguments and Values:
[*]==>	symbol---a symbol that must have a value. 
	value, new-value---an object. 

	Description:
	Accesses the symbol's value cell.

On the surface, it seemed to me (a still-naive CL & CLHS user) that the
"must have a value"[*] restriction should apply to the "setf" form too.
[...except for the stuff later about exceptions, which somewhat contradicted
the above.]

Note that this confusion/question somewhat resembles a thread of some
days ago concerning (setf (gethash <key> <ht> <init-value>) <new-value>)...


-Rob

-----
Rob Warnock, 8L-855		rpw3@sgi.com
Applied Networking		http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.		Phone: 650-933-1673
1600 Amphitheatre Pkwy.		FAX: 650-933-0511
Mountain View, CA  94043	PP-ASEL-IA