[cdr-discuss] Three RFCs

Leslie P. Polzer leslie.polzer at gmx.net
Tue Mar 18 09:56:34 UTC 2008


Dear Christophe,

you wrote:

> (What is "the" backquote expansion object, anyway?)

I'm not sure what you are asking here. The object is
what ` expands into, which is undefined by the spec
(as is the expansion of , and ,@).

CLISP shows this behaviour:

[35]> (defmacro showexp (form) (format t "~{~A~}~%" form))
SHOWEXP
[36]> (showexp `(zoo))
BACKQUOTE(ZOO)
NIL
[37]> (showexp `(, at zoo))
BACKQUOTE((SPLICE ZOO))
NIL
[38]> (showexp `(,zoo))
BACKQUOTE((UNQUOTE ZOO))
NIL

Whereas SBCL seems to have some things going on under the hood:

CL-USER(3): (showexp `(, at zoo))

debugger invoked on a TYPE-ERROR in thread #<THREAD "initial thread" {A723549}>:
  The value ZOO is not of type LIST.

CL-USER(7): (showexp `(,@(list 1 2)))
BACKQ-LIST/1/2/
NIL

A CDR would fix certain parts of this behaviour.

  Leslie




More information about the cdr-discuss mailing list