[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

backquote proposal



I haven't heard any objection to the backquote proposal.  Unless you
guys reply soon, it will become part of the next edition of the RRRS,
and I'll complain when my programs don't run in your implementations, so
speak up.

Small change: I think the name #!unquote-splice is a little better than
#!splice.  If anyone would like to suggest better names, you're welcome
to.

Reminder: the proposal is that
  `x   is identical to  (#!quasiquote x)
  ,x   is identical to  (#!unquote x)
  ,@x  is identical to  (#!unquote-splice x)
for the purposes of QUOTE and READ.  Also, (#!quasiquote <pattern>) is a
new special form which means the same thing as `<pattern> , and within
a <pattern> one may write (#!unquote <expression>) instead of ,<expression>;
similarly for #!unquote-splice.

(Don't worry, I'll send out a proposed precise description before a new
edition of the RRRS happens.)

I have an implementation of a post-read-time #!quasiquote macro expander
(written in scheme, of course) which I'll send to anyone requesting it.
One interesting feature of it is that it does the "right" thing with
nested backquotes, that is, e.g.
  (equal? '`(a ,b) ``(a ,b))
returns a true value, which isn't the case in most backquote
implementations that I know of.  I don't know whether this behavior is
dictated by my backquote proposal, but it seems like desirable behavior
to me.

Jonathan