From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: combining cond and let, to replace pcase. Date: Mon, 27 Nov 2023 19:13:57 +0100 Message-ID: <871qcb83oa.fsf@ledu-giraud.fr> References: Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19982"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Stefan Monnier , emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 27 19:14:30 2023 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 1r7g7p-0004v6-J4 for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Nov 2023 19:14:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7g7W-0000L0-5k; Mon, 27 Nov 2023 13:14:10 -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 1r7g7Q-0000IH-Pq for emacs-devel@gnu.org; Mon, 27 Nov 2023 13:14:05 -0500 Original-Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r7g7O-0000Mh-Nj; Mon, 27 Nov 2023 13:14:04 -0500 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=DN7RASiK fqRpzmWAkx2JZSdSYWG8QZ2r1YJ41dx/ZSY=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=3CXaicftvCha7X5KqsT6JvGhZTB6kt ZgHDtNkTYRVnoLsyQJRtcM8KhV7Zeuebc6r/v25/kY9VCsVmYsRVw+AA== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=DN7RASiKfqRpzmWA kx2JZSdSYWG8QZ2r1YJ41dx/ZSY=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=KduRyDKjGJ+dWt6o2T1y7TU9x3Jw6dxkmQ4Gua 00RVM5glvGRRq93HFLomu5z72H1ukYHbCwik+td4SzAfp+CR0em3Tv06tD1+ngSVMimMBr sBwzWHrbHcF2mPqYBUelWebSSwNiIJ3n+wQTKvRHOTszWW3KByZ9jHpkK4kfuMfL5pKBPP nm9vB/WV5OZdsBH5ULPX1qS2c3W26/0CjlgZpSE8dPv3SvCuncx8W/zAgFqNass3rR+SZ6 i11nlUu04TNIERHT3zurtcJOVo/+TZz7hUBo3CVub54O5v7pISc6U1JUTw9vmm9GOpOpKg 4RKL5mrWgjHAMRgTvMTnijfA== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 16d21d4d (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 27 Nov 2023 19:13:58 +0100 (CET) In-Reply-To: (Richard Stallman's message of "Sun, 26 Nov 2023 22:11:47 -0500") Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:313295 Archived-At: Richard Stallman writes: [...] > > > ;; Like above but always falls thru to next clause. > > > (:match (`(expt ,foo ,bar) x)) > > > ;; Bindings continue in effect. > > > What happens if `(car x)` is not equal to `expt` or if `x` is a string? > > This form of clause should bind the variables unconditionally. If > matching provides a value to give a certain variable, the variable > should get that value. Otherwise it should be bound to nil. So these form of :match clause would bind variables even though it did not match? That seems counter-intuitive to me. -- Manuel Giraud