[Ecls-list] SI:QUASIQUOTE meets CASE during COMPILE-FILE
Samium Gromoff
_deepfire at feelingofgreen.ru
Thu Apr 10 10:43:51 UTC 2008
At Thu, 10 Apr 2008 13:10:14 +0200,
Juan Jose Garcia-Ripoll wrote:
>
> On Wed, Apr 9, 2008 at 8:09 PM, Samium Gromoff
> <_deepfire at feelingofgreen.ru> wrote:
> > foo.lisp: --- 8< ---
> > (defun foo (param)
> > (case param
> > `',@(list)
> > (t nil)))
>
> I am positively sure you are not allowed to do this. It may be that,
> due to the macro expansion they use, SBCL and CLISP makes this work,
> but it is not legal. The arguments to CASE must be static forms. The
> quasiquote form is creating a lisp form that creates a list which is
> equivalent to the one you are trying to build, but this is any form
> and it has to be evaluated
>
> This is clear about that:
> http://www.lisp.org/HyperSpec/Body/sec_2-4-6.html
>
> "An implementation is free to interpret a backquoted form F1 as any
> form F2 that, when evaluated, will produce a result that is the same
> under equal as the result implied by the above definition,"
After some meditation, I recognized that you are right.
I didn't correctly parse the "interpret" part of that sentence,
specifically, I missed that it implies "produce F2 as the final result
of the READ pass."
Thanks for pointing me in the right direction!
regards, Samium Gromoff
More information about the ecl-devel
mailing list