(case 'quote ('lambda 1) (otherwise 2))



I have found 2 Common Lisp implementations that think that the above
code evaluates to 1. This is quite surprising to me.

SBCL 1.0.2 (on Fedora Core 6 x86-64, from the extras repository)
* (case 'quote ('lambda 1) (otherwise 2))
[...]
1

CLisp 2.41 (as above):
[1]> (case 'quote ('lambda 1) (otherwise 2))
1

Both implementations give less surprising results for (eq 'quote
'lambda) and (case 'lambda ('quote 1) (otherwise 2)).

Is this the correct behavior (and if so, where should I look in the
Hyperspec to understand it)? Or do these independent implementations
share an obscure bug?

.



Relevant Pages

  • Re: (case quote (lambda 1) (otherwise 2))
    ... This is quite surprising to me. ... Both implementations give less surprising results for (eq 'quote ... 'lambda is the same as the two element list. ...
    (comp.lang.lisp)
  • Re: Symbol macros dont capture their lexical environments?
    ... And yet you posted a transcript of running that code in CLisp without ... and instead "leaking" internal compiler information. ... and the very reason why I had brought up ... especially when all other implementations ...
    (comp.lang.lisp)
  • Help choose a CL implementation!
    ... There are quite a lot of free CL implementations out there in the big ... From what I've gathered from the group, CLisp seems ... webcrawler, a data mining module, and the web interface. ...
    (comp.lang.lisp)
  • checking implementation defined and implementation dependent behaviour
    ... CLHS invites implementations to document the gaps it explicitly leaves ... I'd be happy if other cases were shown, if some documentation were ... the particular versions of cmucl, sbcl, clisp ... #+(nil nil nil) ...
    (comp.lang.lisp)
  • Re: Symbol macros dont capture their lexical environments?
    ... the compilation and the evaluation environment is not the same? ... And yet you posted a transcript of running that code in CLisp without ... especially when all other implementations ... reality the more likely behaviors are taken from a very small set, ...
    (comp.lang.lisp)