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

LIST* and `



From:     KLE@MIT-AI
Date: Thu, 28 Jul 78 17:59:12 GMT
Original-Date: 07/28/78 13:59:12 EDT
Subject: Re: LIST* and `
    To: JONL at MIT-MC, NIL at MIT-MC, (BUG LISPM) at MIT-MC
    To: (BUG LISP) at MIT-MC

    I am not sure about the LISPM approach but I believe it is the case that at
    least in the version of backquote which I use in Maclisp, that coma [sic]
    and @ are defined in such a way that they only have thier magic effect
    when found within backquoted expressions.  That is '(2 , 4 , 3) still
    returns (2 4 3) and '(3 ,@ 4) still returns (3 @4) since neither of
    these expressions backquoted. I think that if this is also done I would
    not be unhappy with the LISPM approach of having ` defined in the standard
    readtable.  Making all three chars reader macros however, with , and @
    returning error messages if not used within a backquote I would consider
    an ursurping of too many valuable characters. 

Although I agree in spirit that probably this could be engineered (the
multiple definitions of "," and "@"), it hardly seems appropriate to the
mood of cleanliness and readability we need to establish. In order to
maintain maximal readability of code written with these macros, it would
be nice to have "," only useable in that context (so that there is no need
to search outward to see your context in order to interpret this).

Certainly making those two chars be an error out of context is a complete
loss, and I hope no one is pushing that. If so, I wish they would pick
a less used symbol than "," ...

Proposal:

I might suggest that the global syntax for "," should be an abbreviation
for (EVAL (READ)) and that the global syntax for "@" should be as splicing
macro. So that saying ,A<Space> at Lisp would be like saying (EVAL A)
and saying @(A B C) would be like entering A, B, and C in sequence (almost
like A,B,C<Space> in lisp does now. This could be useful if typing several
things that you didn't want to get snarfed until you were sure you had
the whole list ready and typed the ")" on it... A,B,C suffers from the loss
that it delays action from the Lisp because it doesn't wake up the lisp,
but when you try to rub out over the , you find you have awakened it
and all is lost.  It would have to be a context error for a non-list to
follow an @ by this scheme unless some way of defining it i consistently
were come up with.

My point is that if this scheme or something similar were adopted, it
would replace some of the consistency that might otherwise be lost in
current plans for back-quote.

If something along this lines seems to unreasonable to accept, then I
would sooner have @ and , just have normal chracter syntax outside of
` context than have optional secondary meanings for them as there are now.

Comments?