unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Nathan Trapuzzano <nbtrap@nbtrap.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Double unquote/unquote-splicing
Date: Tue, 05 Nov 2013 10:03:51 -0500	[thread overview]
Message-ID: <87fvrahovc.fsf@nbtrap.com> (raw)
In-Reply-To: <jwvob5zhpt9.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 04 Nov 2013 15:41:57 -0500")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> I know (obviously), but I rather dislike this weird intermediate state,
> which doesn't fit cleanly in the usual semantics of unquote (whose
> special syntax makes it clear that it's supposed to have just one
> argument).

I don't think the speical syntax does make that clear.  The point is
that the intermediate state (the state of the object that gets passed
from the reader to the evaluator) is itself not defined.  And even if it
were defined (as in Scheme), I don't see why \, and \@, couldn't take
more than one argument (again, as with Scheme's unquote and
unquote-splicing special operators).

> Your example was the first concrete example I've seen where such
> a ,,@foo construct was used and as you've seen it's trivially replaced
> by ,@(list ,@foo) (which is true because ,foo is equivalent to ,@(list
> foo).

Hmm, I'm actually not sure that will always work.  My hunch is that it
only works consistenly at the most deeply nested level.  (I say so
because I know CL's expansion rules are only guaranteed to be
semantically equivalent when the most deeply nested levels are expanded
first and then the rest of the expansion proceeds outwards.)

> So ,,@ is not a very compelling use.  Maybe ,@,@ would be more
> compelling, but I haven't seen any concrete use for it yet, so I can't
> comment.

Can't say I know of a good use of ,@,@.  That said, I think it would be
silly for this proposal to stand or fall on that basis.



  reply	other threads:[~2013-11-05 15:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-04 14:03 Double unquote/unquote-splicing Nathan Trapuzzano
2013-11-04 17:27 ` Stefan Monnier
2013-11-04 17:59   ` Nathan Trapuzzano
2013-11-04 18:11     ` Nathan Trapuzzano
2013-11-04 18:33     ` Stefan Monnier
2013-11-04 19:01       ` Drew Adams
2013-11-04 19:09       ` Nathan Trapuzzano
2013-11-04 20:41         ` Stefan Monnier
2013-11-05 15:03           ` Nathan Trapuzzano [this message]
2013-11-05 19:14             ` Stefan Monnier
2013-11-05  4:01         ` Stephen J. Turnbull
2013-11-05 15:22           ` Nathan Trapuzzano
2013-11-05 21:48             ` Stephen J. Turnbull

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/emacs/

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

  git send-email \
    --in-reply-to=87fvrahovc.fsf@nbtrap.com \
    --to=nbtrap@nbtrap.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).