From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nathan Trapuzzano Newsgroups: gmane.emacs.devel Subject: Re: Double unquote/unquote-splicing Date: Tue, 05 Nov 2013 10:03:51 -0500 Message-ID: <87fvrahovc.fsf@nbtrap.com> References: <87wqko6z8g.fsf@nbtrap.com> <874n7sf3pi.fsf@nbtrap.com> <87habsdlwo.fsf@nbtrap.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1383663879 13356 80.91.229.3 (5 Nov 2013 15:04:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Nov 2013 15:04:39 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 05 16:04:43 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VdiBN-0002zY-0W for ged-emacs-devel@m.gmane.org; Tue, 05 Nov 2013 16:04:41 +0100 Original-Received: from localhost ([::1]:56600 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdiBM-0007Hi-Jl for ged-emacs-devel@m.gmane.org; Tue, 05 Nov 2013 10:04:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdiBB-0007Gv-4m for emacs-devel@gnu.org; Tue, 05 Nov 2013 10:04:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VdiAy-0006pe-JP for emacs-devel@gnu.org; Tue, 05 Nov 2013 10:04:28 -0500 Original-Received: from oproxy7-pub.mail.unifiedlayer.com ([67.222.55.9]:60533) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1VdiAy-0006pC-2i for emacs-devel@gnu.org; Tue, 05 Nov 2013 10:04:16 -0500 Original-Received: (qmail 4586 invoked by uid 0); 5 Nov 2013 15:03:53 -0000 Original-Received: from unknown (HELO host393.hostmonster.com) (66.147.240.193) by oproxy7.mail.unifiedlayer.com with SMTP; 5 Nov 2013 15:03:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbtrap.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=J6PY0eMvv8Z0evecRi+Vj6j2XnX9Fya2Q3OdukQS468=; b=whLoUchy8VrgfYrir7ECYmZ4kaWit/hPSzaGDoxhlGDPYSwI/4UaiXgZfmB1hiTIGs28PdZf534gwkxeIToYPOaF45yB33B6Zr55USy+Io0bz/ltzw95YnK4ls8a5Sdh; Original-Received: from [50.90.253.209] (port=48286 helo=Nathan-GNU) by host393.hostmonster.com with esmtpsa (TLSv1:CAMELLIA128-SHA:128) (Exim 4.80) (envelope-from ) id 1VdiAb-0003wU-7y; Tue, 05 Nov 2013 08:03:53 -0700 In-Reply-To: (Stefan Monnier's message of "Mon, 04 Nov 2013 15:41:57 -0500") User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3.50 (gnu/linux) X-Identified-User: {1585:host393.hostmonster.com:nbtrapco:nbtrap.com} {sentby:smtp auth 50.90.253.209 authed with nbtrap@nbtrap.com} X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 67.222.55.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:164961 Archived-At: Stefan Monnier 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.