From ... Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!134.222.94.5!npeer.kpnqwest.net!nreader1.kpnqwest.net.POSTED!not-for-mail Newsgroups: comp.lang.lisp Subject: Re: special forms. References: <2h7kx862at.fsf@dslab7.cs.uit.no> Mail-Copies-To: never From: Erik Naggum Message-ID: <3204360405280869@naggum.net> Organization: Naggum Software, Oslo, Norway Lines: 34 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 17 Jul 2001 12:06:46 GMT X-Complaints-To: newsmaster@Norway.EU.net X-Trace: nreader1.kpnqwest.net 995371606 193.71.66.1 (Tue, 17 Jul 2001 14:06:46 MET DST) NNTP-Posting-Date: Tue, 17 Jul 2001 14:06:46 MET DST Xref: archiver1.google.com comp.lang.lisp:13239 * Frode Vatvedt Fjeld > Notice also that both OR and AND are also special forms. Not so. Both are defined as macros in Common Lisp. That they expand into an if is probably more of a problem, although many functions can be defined like this if the compiler knows how to deal with the function: (defun car (x) (car x)) (Hint: car needs to be an exported function, not just available to compiled code.) Essentially, therefore, the use of or and and reduce to this: (defun my-if (cond cons alt) (if cond cons alt)) Which illustrates another point with special forms: The are _not_ function-callable. A special form is known to the evaluator, which does something unique (special) with it. Note that how the compiler and the evaluator deal with special forms may differ _wildly_, but the results are specified to be identical. This is actually no small accomplishment. Besides, the modern term is "special operator". (if foo bar zot) is a special form, while if (in the functional position) is a special operator. There is a huge insurance company in Scandinavia called "if". They also return your values conditionally, is quite a special operator, and do not follow normal evaluation rules. This is probably all a coincidende. #:Erik -- Travel is a meat thing.