emacs-devel
[Top][All Lists]
Advanced

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

Re: Double unquote/unquote-splicing


From: Nathan Trapuzzano
Subject: Re: Double unquote/unquote-splicing
Date: Tue, 05 Nov 2013 10:03:51 -0500
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3.50 (gnu/linux)

Stefan Monnier <address@hidden> 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 via email to

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