Subject: Re: SETQ vs SETF
From: rpw3@rpw3.org (Rob Warnock)
Date: Fri, 26 Mar 2004 03:15:23 -0600
Newsgroups: comp.lang.lisp
Message-ID: <9p2dnVslQZE2af7d3czS-w@speakeasy.net>
Andr� Thieme  <this.address.is.good.until.2004.apr.17@justmail.de> wrote:
+---------------
| Tim Bradshaw wrote:
| > In fact, it's conceptually identical, because SETF is a macro, not a
| > special operator.
| 
| Are there any "special operators" in Lisp? Or does it in every case
| mean that (when someone is talking about them) it is a macro?
+---------------

Yes; and no, not necessarily (but maybe). There *are* special operator
in Common Lisp, see CLHS "3.1.2.1.2.1 Special Forms" for a list:

	The set of special operator names is fixed in Common Lisp;
	no way is provided for the user to define a special operator.
	The next figure lists all of the Common Lisp symbols that have
	definitions as special operators. 

	block      let*                  return-from      
	catch      load-time-value       setq             
	eval-when  locally               symbol-macrolet  
	flet       macrolet              tagbody          
	function   multiple-value-call   the              
	go         multiple-value-prog1  throw            
	if         progn                 unwind-protect   
	labels     progv                                  
	let        quote                                  

	Figure 3-2. Common Lisp Special Operators 

HOWEVER... There is a good reason you might occasionally be a little bit
confused about that, namely CLHS "3.1.2.1.2.2 Macro Forms", which says:

	An implementation is free to implement a Common Lisp special
	operator as a macro.

And conversely:

	An implementation is free to implement any macro operator as a
	special operator, but only if an equivalent definition of the
	macro is also provided.

All clear now???  ;-}  ;-}


-Rob

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