Subject: Re: SETQ vs SETF
From: (Rob Warnock)
Date: Thu, 25 Mar 2004 05:15:52 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
Christopher C. Stacy <> wrote:
| SETQ and SET are historical legacies from the original Lisp ...
| Note that SETQ is "a special form of SET"...

As this late-comer understands it, "In the beginnning there was SET..."
Only. And the evolution of style went something like this:

	(set (quote foo) (+ baz 13)) ; Pronounced "SET  QUOTEFOO..."

	(set 'foo (+ baz 13))	     ; Still pronounced "SET  QUOTEFOO..."

	(set' foo (+ baz 13))	     ; Note the slightly different spacing!!
				     ; Pronounced "SETQUOTE  FOO..."

Then somebody did this (or the moral equivalent of it):

	(defmacro setq (var val)
	  `(set ',var ,val))

	(setq foo (+ baz 13))	     ; Still pronounced "SETQUOTE  FOO..."

Then when lexical variables can around, SETQ had to become a special
form, not just a macro. And then SETF and DEFSETF and SETF functions
happened, and that's where we are today.


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607