[Openmcl-devel] SETQ

Robert Boyer boyer at cs.utexas.edu
Tue Dec 16 11:47:52 PST 2008


> SETQ is a special form. It cannot be written by a
> simple macro.

I get dumber every day, but I increasingly enjoy it
every time that someone shows me how wrong I am.

What's so bad about:

  (defmacro new-setq (x y) `(set ',x ,y))

In my remarks, I was thinking rhetorically and
historically about Lisp way back at its creation in the
50s, way before the terms 'special form' and 'special
operator' and 'special' were coined.  No doubt you are
right, though, in a fine sense.

Bob

-------------------------------------------------------


To: openmcl-devel at clozure.com
From: "Tobias C. Rittweiler" <tcr at freebits.de>
Date: Tue, 16 Dec 2008 19:48:21 +0100
Subject: Re: [Openmcl-devel] Fwd: Soliciting examples of Lisp macros

Robert Boyer <boyer at cs.utexas.edu> writes:

>    How would you provide SETQ if you only had SET?

SETQ is a special form. It cannot be written by a simple macro.

  -T.

_______________________________________________
Openmcl-devel mailing list
Openmcl-devel at clozure.com
http://clozure.com/mailman/listinfo/openmcl-devel

-------------------------------------------------------

(defmacro new-setq (x y) `(set ',x ,y))
NEW-SETQ
? (new-setq foo 3)
3
? foo
3
? 



More information about the Openmcl-devel mailing list