[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] ANN: first draft of R7RS small language available
On Sat, May 7, 2011 at 9:54 PM, Andre van Tonder <andre@x> wrote:
>> (let ((+ -)) (quote +)) => +
>> is matching symbols by name, do we want '-' instead?
> That would defeat the purpose of QUOTE. QUOTE gives a way of writing
> symbolic data (or more generally s-expression datums) literally. What you
> see on the screen is what you get. Its value is unaffected by any enclosing
> bindings. I thnk you are overcomplicating something very simple.
Without LET this would behave just like a normal QUOTE form. The
situation isn't much different from ELSE in COND, which also behaves
normally unless someone tries to bind it to #f.
> I think the confusion comes from the overloading of symbols for identifiers
> and symbolic data. '+ just denotes a symbolic datum, like 1 or "abc".
Thanks, Andre. Do you have any idea why rebinding UNQUOTE or
UNQUOTE-SPLICING affects expansion of QUASIQUOTE in plt-scheme? If I
could assume that's a regular bug and that the intended behavior is to
match UNQUOTEs by name that would make my job a lot easier.
Scheme-reports mailing list