From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lynn Winebarger Newsgroups: gmane.emacs.devel Subject: Re: Instead of pcase Date: Sun, 10 Dec 2023 16:13:19 -0500 Message-ID: References: <87fs169mjj.fsf@posteo.net> <093f11a1-57c2-5e56-d39b-26fef1c67cbb@gutov.dev> <25942.25061.217864.329049@retriever.mtv.corp.google.com> <87zfzdcz6z.fsf@posteo.net> <87zfza2aq2.fsf@web.de> <7nmsv9zq6u.fsf@ecube.ecubist.org> <7nv89x5tsi.fsf@ecube.ecubist.org> <87o7focuf5.fsf@web.de> <875y1r10jr.fsf@web.de> <87v895iyzy.fsf@web.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000024c462060c2e4a2c" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39133"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 10 22:14:19 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 1rCR7z-0009zE-KS for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Dec 2023 22:14:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCR7M-00064n-IV; Sun, 10 Dec 2023 16:13:40 -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 1rCR7L-00064a-0J for emacs-devel@gnu.org; Sun, 10 Dec 2023 16:13:39 -0500 Original-Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rCR7F-0007MS-U1 for emacs-devel@gnu.org; Sun, 10 Dec 2023 16:13:38 -0500 Original-Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-3b8b782e142so3274387b6e.1 for ; Sun, 10 Dec 2023 13:13:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702242812; x=1702847612; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=LlIXCAvlootMrXHnoEzD8jaG8V8aCLCc5bIiCyLoFgA=; b=MirVqSRnWDqrnfQmGJrgFU9Jdpb9557R3SurTsc48Bnr3YYKySYvg3qqo2BtuxINPH pOroheEMCepieCu6rHU8crhOdfgSeJ9w5oEyf7/jeP6j8v0vx4lAofGD7YEIlBFzPTvr LT5753/jeTWFzzmrR4Nug9xpl5giAPd/1R+ASyhCEAx0W9kk2xqH0PmRL4dN5KzH0S9H 3OFvAKyjEvo3pYmAAHb673Ao+XWIhfl3CMfvL4jIK+LQaoWV4XZs1MqzxFcgsEezh1c4 xzlgPnGehDc1yJ6dukdnimLmC3UG/m63PwdqH0PUaTLAM84Yg3xLxo0Zm291Ikg8cDvV zeiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702242812; x=1702847612; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LlIXCAvlootMrXHnoEzD8jaG8V8aCLCc5bIiCyLoFgA=; b=IPxEv6XLR9Jrzjx0NcBm/cLxZBxxqIfXIfHgkffLxyC+FfRkh2wvNPj00iT/4AQ4MV f/CPUVOc7HJ7V8hVHWzj8MPPkr2W85D2yFzLyhqfEApJ7HwchuWCkodByDjx6tnsYPRU eGG+FtjrZHnnG34gHHXJNKNEEclF0drnJtALNWbi5p1QE1OvmoC1qj+fEv9eXLBgQsWM PHicsVEX87+F8BFCTiy8W0Ksz3u1K+7+AzYWmH/U6phzGA9I/vLZTCugVtYH4FkcUPpN YTfYbCsA1M7LbJxQB0sR8eT956jxbEs+1IE/woZn3+IwJ55Mko7kz7UC9hRL97sF/sej ODtQ== X-Gm-Message-State: AOJu0YxqyJnH+mCS4vuK+F5CbRXQpZX2/wBILzBWhNpGUnx2F2FqaPga 037AB7g/ifzJrDgZF8MnRBuwJTl/RCTQCOwqnTs= X-Google-Smtp-Source: AGHT+IGVFiuJ1+xlTkf73wOxQHrWeOWOz56kYzCYIqVfwEW9SfDaoQuTjtAcy5fmLWSTDgZyZp1gwWG9Dt506XkI0GE= X-Received: by 2002:a05:6808:d51:b0:3b9:e7f5:39b8 with SMTP id w17-20020a0568080d5100b003b9e7f539b8mr4667867oik.36.1702242812215; Sun, 10 Dec 2023 13:13:32 -0800 (PST) In-Reply-To: <87v895iyzy.fsf@web.de> Received-SPF: pass client-ip=2607:f8b0:4864:20::235; envelope-from=owinebar@gmail.com; helo=mail-oi1-x235.google.com 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=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:313695 Archived-At: --00000000000024c462060c2e4a2c Content-Type: text/plain; charset="UTF-8" On Sun, Dec 10, 2023, 3:28 PM Michael Heerdegen via Emacs development discussions. wrote: > Lynn Winebarger writes: > > > The pattern would match a let or let* form that has bindings but no > > body. > > No - it matches where the body is the last variable. Not an empty body > - right? > I stand corrected - looks like I miscounted parentheses and/or misunderstood the scoping rules of non-linear pattern variables. The reasoning for the validity of the transformation is essentially the same, except instead of no variable references in the body, there is exactly one variable reference. It seems like this could be generalized somewhat, particularly for let forms, but I'm guessing this particular case is frequently generated by macros or in the compiler itself. Lynn --00000000000024c462060c2e4a2c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, Dec 10, 2023, 3:28 PM Michael Heerdegen via Emacs deve= lopment discussions. <emacs-devel= @gnu.org> wrote:
Lynn Wineba= rger <owinebar@gmail.com> writes:

> The pattern would match a let or let* form that has bindings but no > body.

No - it matches where the body is the last variable.=C2=A0 Not an empty bod= y
- right?

I stand corrected - looks like I miscounted parentheses and/or mi= sunderstood the scoping rules of non-linear pattern variables.=C2=A0 The re= asoning for the validity of the transformation is essentially the same, exc= ept instead of no variable references in the body, there is exactly one var= iable reference.

It seem= s like this could be generalized somewhat, particularly for let forms, but = I'm guessing this particular case is frequently generated by macros or = in the compiler itself.

= Lynn

--00000000000024c462060c2e4a2c--