Subject: Re: SETQ vs SETF
From: rpw3@rpw3.org (Rob Warnock)
Date: Thu, 25 Mar 2004 05:15:52 -0600
Newsgroups: comp.lang.lisp
Message-ID: <e6ycnd5_sbH1Iv_d3czS-g@speakeasy.net>
Christopher C. Stacy <cstacy@news.dtpq.com> 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

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607