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: Code for cond* Date: Fri, 26 Jan 2024 22:35:56 -0500 Message-ID: References: <874jf3rkzx.fsf@yahoo.com> <87le8ehqew.fsf@localhost> <87zfwurjv4.fsf@yahoo.com> <87cytqhn35.fsf@localhost> 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="18755"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?iso-8859-1?Q?Jo=C3=A3o_T=C3=A1vora?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 27 04:36:34 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 1rTZUf-0004fk-J1 for ged-emacs-devel@m.gmane-mx.org; Sat, 27 Jan 2024 04:36:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTZU7-0007CZ-JU; Fri, 26 Jan 2024 22:35:59 -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 1rTZU6-0007CC-Il for emacs-devel@gnu.org; Fri, 26 Jan 2024 22:35:58 -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 1rTZU6-0004cf-Af; Fri, 26 Jan 2024 22:35:58 -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=au3DPnoawX9WCrNf4cAD+DzMjaM3Nvj2dFXfkzUj6iw=; b=rOz7Kuhhk6lW bRlR+URGksVqXw2kHtOw8uB0Hans0oqjYuItGPcfxBSQTI8rUD0a0vQqHXKoMg43XRfKzZ/Pm9b/P k3F97mG+dWLovfaB6kgzokLhItq7yRHQ0ovRtEtJ6UvSI1MmuDYdOt7Mh5ek6SX1g3YrRVWPBu6Nv DWyo2bwECBlpdsgwqvCud2WMBO6mn+2E72d/sBYFHLTc1qPhvWEeR47OsTB2ko3Y6qwK45Tmr8270 0r4oGPjoeSHgvRmwCF2KUJOLEbVoQ/LszJRgmGYqtuQol47beaVJuGbNKm9n7rNddVETOf1mcj977 arLGshpkkAaZxC3HJUpJHg==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1rTZU4-0007Mg-SN; Fri, 26 Jan 2024 22:35:56 -0500 In-Reply-To: (message from =?iso-8859-1?Q?Jo=C3=A3o_T=C3=A1vora?= on Wed, 24 Jan 2024 13:52:30 +0000) 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:315455 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. ]]] In pcase, all the patterns have to match one and the same datum. I've designed cond* so that each pattern-matching specifies a datum to match the pattern to. That is an advance. But it could be convenient not to have to respecify the datum each time when it is the same datum. With the crrenbt cond* syntax, a way to say "use the same datum: could be, by omitting the DATUM from the match* subform to reuee the datum of the previous match* subform, like this: (cond* ((match* P1 foo) ...) ((match* PX) :no-exit) ((match* P2) ...) ((match* P3) ...) ((match* P4 bar) ...)) For the alternate keyword-based cond* synax, there could be a keyword to specify a datum for subsequent matches. (cond* :datum foo ;; Next 4 match agains foo. (:match P1 ...) :match PX (:match P2 ...) (:match P3 ...) :datum bar (:match P4 ...)) I'm interested in feedback about this possible additional feature in each of the two forms of syntax. -- 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)