[Top][All Lists]

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

Re: quasiquote badness

From: Andy Wingo
Subject: Re: quasiquote badness
Date: Thu, 04 Dec 2008 16:22:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)


On Tue 02 Dec 2008 19:56, address@hidden (Ludovic Courtès) writes:

> Andy Wingo <address@hidden> writes:
>> While diagnosing a problem in the vm branch, I found this in master:
>>     guile> `,@x
>>     (unquote-splicing x)
>> This should throw an error.
> I think I agree, but interestingly, Bigloo's interpreter produces the
> exact same result and Ikarus' gives ",@x".  Is there some subtle
> subtlety we're missing or is everyone off?

Could be others are off? R5RS says in 4.2.6:

     If a comma appears followed immediately by an at-sign (@), then the
     following expression must evaluate to a list; the opening and
     closing parentheses of the list are then "stripped away" and the
     elements of the list are inserted in place of the comma at-sign
     expression sequence. A comma at-sign should only appear within a
     list or vector <qq template>.

The above template is not a list, therefore unquote-splicing is in an
invalid context.

R6RS is stricter, saying in 11.17:

     Any unquote-splicing or multi-operand unquote form must appear only
     within a list or vector qq template.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]