From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Double unquote/unquote-splicing Date: Mon, 04 Nov 2013 13:33:15 -0500 Message-ID: References: <87wqko6z8g.fsf@nbtrap.com> <874n7sf3pi.fsf@nbtrap.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1383590008 24746 80.91.229.3 (4 Nov 2013 18:33:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Nov 2013 18:33:28 +0000 (UTC) Cc: emacs-devel@gnu.org To: Nathan Trapuzzano Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 04 19:33:33 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 1VdOxx-00057R-19 for ged-emacs-devel@m.gmane.org; Mon, 04 Nov 2013 19:33:33 +0100 Original-Received: from localhost ([::1]:51448 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdOxw-0004FW-CJ for ged-emacs-devel@m.gmane.org; Mon, 04 Nov 2013 13:33:32 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdOxo-0004F9-3l for emacs-devel@gnu.org; Mon, 04 Nov 2013 13:33:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VdOxi-0006eb-F5 for emacs-devel@gnu.org; Mon, 04 Nov 2013 13:33:24 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:22228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdOxi-0006eT-BS for emacs-devel@gnu.org; Mon, 04 Nov 2013 13:33:18 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFxLzd/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBgzBIZEKA4hhnBmBXoMV X-IPAS-Result: Av4EABK/CFFFxLzd/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBgzBIZEKA4hhnBmBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="37063523" Original-Received: from 69-196-188-221.dsl.teksavvy.com (HELO pastel.home) ([69.196.188.221]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 04 Nov 2013 13:33:17 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id A7F6260D75; Mon, 4 Nov 2013 13:33:15 -0500 (EST) In-Reply-To: <874n7sf3pi.fsf@nbtrap.com> (Nathan Trapuzzano's message of "Mon, 04 Nov 2013 12:59:21 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 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:164938 Archived-At: >> 2- Since we don't allow (\` (a (\, 1 2 3))), it's weird to allow >> ``(a ,,@x) since one possible expansion for it when x=(1 2 3) is >> (\` (a (\, 1 2 3))). >> Another way to say it is that we should allow (\, 1 2 3) and (\,@ >> 1 2 3), but that can't be used with the ,e and ,@e syntax, so it'll >> stay as a second-rate citizen. > This is incorrect. ``(a ,,@x) where x=(1 2 3) would evaluate to > (\` (a (\, 1) (\, 2) (\, 3))). The first comma in ,,@ has the effect of > being applied member-wise to each element spliced out of ,@. Cf. CLHS > `Backquote' (http://www.lispworks.com/documentation/HyperSpec/Body/02_df.htm). This is even worse since it means that the expansion of ,@foo depends on the context. > I believe so. (FWIW, I don't think it's that easy to tell, though I'm > not great at this. Back to problem nb 1, eh? > "The backquote syntax was particularly powerful when nested. This > occurred primarily within macro-defining macros; because such were coded > primarily by wizards, the ability to write and interpret nested > backquote expressions was soon surrounded by a certain mystique. Alan > Bawden of MIT acquired a particular reputation as backquote-meister in > the early days of the Lisp Machine." - "The Evolution of Lisp", Gabriel, > Steele. That sounds about right: it's only for wizards. Nested backquotes were largely broken in Elisp and it took many years for someone to notice. I do use them occasionally, but only in fairly simple ways. The resulting code is largely impenetrable, so I don't want to encourage it. Stefan