unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: bug-guile@gnu.org
Subject: Re: quasiquote badness
Date: Thu, 04 Dec 2008 16:22:31 +0100	[thread overview]
Message-ID: <m3iqq0x8w8.fsf@pobox.com> (raw)
In-Reply-To: <877i6iv22b.fsf@gnu.org> ("Ludovic Courtès"'s message of "Tue, 02 Dec 2008 19:56:12 +0100")

Hi,

On Tue 02 Dec 2008 19:56, ludo@gnu.org (Ludovic Courtès) writes:

> Andy Wingo <wingo@pobox.com> 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.

Cheers,

Andy
-- 
http://wingolog.org/




      parent reply	other threads:[~2008-12-04 15:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-30 21:14 quasiquote badness Andy Wingo
2008-12-02 18:56 ` Ludovic Courtès
2008-12-03 15:23   ` Marijn Schouten (hkBst)
2008-12-04 15:22   ` Andy Wingo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3iqq0x8w8.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=bug-guile@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).