From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#56875: 29.0.50; [PATCH] Add thread-as macro Date: Tue, 02 Aug 2022 14:24:38 +0300 Message-ID: <83fsie28i1.fsf@gnu.org> References: <87h72vq4eq.fsf@gmail.com> <877d3r0x22.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8929"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56875@debbugs.gnu.org, arstoffel@gmail.com To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 02 13:28:25 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oIq4W-00027r-Pv for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Aug 2022 13:28:24 +0200 Original-Received: from localhost ([::1]:60772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIq4V-0001D3-4O for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Aug 2022 07:28:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIq2E-0006AU-Kx for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2022 07:26:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52883) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIq2E-0007dc-0Z for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2022 07:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oIq2D-0004mv-S4 for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2022 07:26:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Aug 2022 11:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56875 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch moreinfo Original-Received: via spool by 56875-submit@debbugs.gnu.org id=B56875.165943951118340 (code B ref 56875); Tue, 02 Aug 2022 11:26:01 +0000 Original-Received: (at 56875) by debbugs.gnu.org; 2 Aug 2022 11:25:11 +0000 Original-Received: from localhost ([127.0.0.1]:42631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIq1O-0004lk-TW for submit@debbugs.gnu.org; Tue, 02 Aug 2022 07:25:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIq1O-0004lW-00 for 56875@debbugs.gnu.org; Tue, 02 Aug 2022 07:25:10 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43006) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIq1B-0007Bf-9E; Tue, 02 Aug 2022 07:25:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=mV7kNn1VtDmGObbPqf1OaDbPqt8fKbHOHM47oF32QqA=; b=JwHrK9RM+50BPuXdo5uv uwmdHHXQcjcgXx550myBCbxxw/Oj4EgjMbuMujsuDIwN/TPhRWwSnMWdb5UH+WNB8gubz+q/e6Gp2 0E8T7DzrO6TPYBarU48i9NO3F69/8TkKTJ7t/JwlRKZ9hGG65KbgOQAUVU5hjVTKa8WkQeOl60EiV VzF7RPM7eSttRKvBoY8eb3w1w/eA96luLuKoZ2ju4EBT7gmHkeMv5uQQUX8yUzPVx/ZXTxkTv6pVb CP4+u8BjFexjT7gj1jj5rGFPqURvJgxSsfRy7edImZwv1NDnK2oJh04m4Uw0v8RZdrNF4mBvaJIP8 0Y84m16LuZstYw==; Original-Received: from [87.69.77.57] (port=4436 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIq12-0001hJ-0m; Tue, 02 Aug 2022 07:24:49 -0400 In-Reply-To: <877d3r0x22.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue, 02 Aug 2022 12:17:09 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:238531 Archived-At: > From: Lars Ingebrigtsen > Cc: 56875@debbugs.gnu.org, "'Eli Zaretskii'" > Date: Tue, 02 Aug 2022 12:17:09 +0200 > > Augusto Stoffel writes: > > > +(defmacro thread-as (var &rest forms) > > + "Successively bind VAR to the result of evaluating each of the FORMS. > > +Return the last computed value. > > + > > +Example: > > + (thread-as x > > + 4 > > + (- 10 x) > > + (/ x 2)) > > + ⇒ 3" > > + (declare (indent 1)) > > I'm not enthusiastic. As experience with the other threading macros has > shown, they're neat hacks, but they're not used much in actual code > (because there's no culture for reading code that's formatted that way > in Emacs Lisp). > > If others think that this would be useful, I won't object to adding it, > though. Eli, what do you think? TBH, I tend to agree. And I'd like to hear the rationale, to make the discussion more concrete. Maybe if the reasons are good enough, I'll change my mind. Just looking at the usage, it does sound a bit artificial.