From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Installing cond* in core Date: Thu, 01 Feb 2024 22:39:16 -0500 Message-ID: References: Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19488"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 02 04:39:47 2024 Return-path: Envelope-to: ged-emacs-devel@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 1rVkP4-0004sQ-VS for ged-emacs-devel@m.gmane-mx.org; Fri, 02 Feb 2024 04:39:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVkOe-0000Yb-0D; Thu, 01 Feb 2024 22:39:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rVkOb-0000Xy-Ui for emacs-devel@gnu.org; Thu, 01 Feb 2024 22:39:17 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rVkOb-0006ro-DK; Thu, 01 Feb 2024 22:39:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=f4v7uAu61UmI89imgmZzMi/iiJ3n+IHoKBBAqCDpQn8=; b=QYB2KP5Il4/G 18PcrwgIUQ8uA/5Z7kJeiux3qKffUOHsegq3gaHh7Q2+AllLwhTKX4ahwDkdb14JgZGoWKj13COw1 mJaVK3WldS5pjTcxMocGTC3tvUTBN6WbSofOOJyDWyEjnqGpjcPr9aCtGYb7nmizTGHAnHY6qiQ+I S4bT+770DIcmnAgBt6Z/aNhPnefZR95kSDy3+pzyaSFqHKHIzLOPjJxtZMqojqQHX0lI1v/1QuRxV m1T4etE5YssO9mbydsLtOuRBe6UQWCEVJJYyrpvoZHQhEEd+T/H2omXxPgINoFbHZDyVEcRnOGSER iwLoP/jV8kEm0Pk8rWUZfQ==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1rVkOa-0008Ax-Jn; Thu, 01 Feb 2024 22:39:16 -0500 In-Reply-To: (message from Stefan Monnier on Tue, 30 Jan 2024 09:33:53 -0500) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:315731 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > I think the question is rather: why should we have two equivalent and > almost identical matching syntaxes and implementations? That is the easiest way to make cond* function. (The only work needed will be future maintenance.) It is a way something I can feasibly take. I do not see any other alternative that I could feasibly do. I do not understand the pcase code for implementing pattern matching, and figuring it out would be the first hurdle of trying to fit it into cond*, if that were done by me. A priori, I suspect it won't fit. cond*-subpat, which does this job in cond*, passes data up and down the recursion. I can't tell whether pcase does something comparable. Also, cond*-subpat does not generate the overall structure of a clause -- its caller, cond*-match, does that. Based on looking at the Lisp code pcase produces, I expect that it generates the overall structure of the clause as part of success for a pattern. Perhaps the work would be much less if done by you. But I don't have the option of doing this as you; I could only do it as me. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)