emacs-devel
[Top][All Lists]
Advanced

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

Re: Double unquote/unquote-splicing


From: Stefan Monnier
Subject: Re: Double unquote/unquote-splicing
Date: Tue, 05 Nov 2013 14:14:52 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> I don't think the special syntax does make that clear.

You can't use that special syntax for multi-arg unquote and
unquote/unquote-splicing.  So the special syntax makes it clear that
those are expected to take a single arg.  And indeed, so far, they
can only take a single arg.

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

Goes to show again that it's too complex for our own good.

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

There's a straightforward rewriting of ",,@", and there's no known use
case for ",@,@" (which AFAIK can be rewritten ",@(append ,@" anyway if
you really need it).  It probably doesn't break any code, but I prefer
to keep the rule that unquote/unquote-splicing takes a single argument,
since that's true 99.99% of the time, so while people are likely to
understand the single-arg case, and they're unlikely to understand the
multi-arg case.


        Stefan



reply via email to

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