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

backquote proposal

    Date: Wed, 20 Nov 85 14:05:35 est
    From: Kent Dybvig <dyb%indiana.csnet at CSNET-RELAY.ARPA>

    I like the proposed backquote change, especially since it will
    allow source pretty-printers to print the original source more

    However, I do not like the use of "special objects" as special
    form keywords, and would prefer to use ordinary identifier names

    The reason is that, at least in my implementation, #! objects are
    not symbols, and special form keywords are.  I would very much
    like to retain this property, for selfish reasons and because I
    think it helps anyone writing program-manipulating programs to
    know that special forms always begin with a symbol.

    Also, it would not make sense that backquote special forms are
    written with the #! if the quote special form is not.

OK, I sympathize with this.  What do other people think?

Note that I never said that #!QUASIQUOTE was NOT a symbol.  Things would
work just fine if it was, although it would have to print the same way
it reads.

    Therefore, I propose that we use the special forms quasiquote,
    unquote, and unquote-splice, dropping the #!.

I never suggested making #!UNQUOTE and #!UNQUOTE-SPLICE be special
forms, so I don't think this argument applies to them, except through
guilt by association (i.e. consistency).

I think that flagging the printed representation of these markers with
#! is good since it helps indicate that something peculiar is going on.
There is always the danger that someone will write something like
	(memq z '(quote unquote quasiquote))
and that someone else will lift that code and put it into backquote
form somewhere, say

	(let ((form `(cond ((memq z '(quote unquote quasiquote)) ,value))))
	  (compute form))

and then get the error message "QUASIQUOTE unbound variable" and wonder
what on earth happened.  This violation of referential transparency is
unavoidable with non-local features like backquote, but the #!'s help
mitigate it since they make the violation more voluble.