![](https://secure.gravatar.com/avatar/326b108ffcc42f27628703b0c11ed239.jpg?s=120&d=mm&r=g)
7 Sep
2010
7 Sep
'10
10:28 p.m.
On Tue, Sep 7, 2010 at 11:15 PM, Daniel Weinreb <dlw@itasoftware.com> wrote:
What happens if you do
(defun foo (x) (plus x 3))
Since (constantp 'x) yields nil, the compiler macro will bail out. I suppose a smarter version could perform some optimizations when only one of the arguments is constant. On a related note, I just came across this SBCL effort <https://bugs.launchpad.net/sbcl/+bug/632368> which has the potential to make compiler macros significantly more powerful by handing forms over only after they've been through the compiler's inlining and constant propagation phases! -- Luís Oliveira http://r42.eu/~luis/