Subject: Re: SETQ vs SETF
From: (Rob Warnock)
Date: Fri, 26 Mar 2004 03:15:23 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
Andr� Thieme  <> 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 " 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 " 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 Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607