From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Marco Antoniotti Newsgroups: gmane.emacs.bugs Subject: bug#70597: Problem in pcase-let? Date: Thu, 2 May 2024 13:06:58 +0200 Message-ID: References: <662d23bf.050a0220.a4e2f.3f45@mx.google.com> <865xvwmus2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000b9823c0617769ac0" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10464"; mail-complaints-to="usenet@ciao.gmane.io" Cc: brubar.cs@gmail.com, Stefan Monnier , 70597@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 02 13:08:12 2024 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 1s2UIO-0002Vc-9q for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 May 2024 13:08:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2UI9-00084p-QA; Thu, 02 May 2024 07:08:00 -0400 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 1s2UHw-00080d-Mw for bug-gnu-emacs@gnu.org; Thu, 02 May 2024 07:07:44 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2UHs-0004gT-Eb for bug-gnu-emacs@gnu.org; Thu, 02 May 2024 07:07:44 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s2UID-00075Z-VO for bug-gnu-emacs@gnu.org; Thu, 02 May 2024 07:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Marco Antoniotti Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 May 2024 11:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70597 X-GNU-PR-Package: emacs Original-Received: via spool by 70597-submit@debbugs.gnu.org id=B70597.171464805927243 (code B ref 70597); Thu, 02 May 2024 11:08:01 +0000 Original-Received: (at 70597) by debbugs.gnu.org; 2 May 2024 11:07:39 +0000 Original-Received: from localhost ([127.0.0.1]:43114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2UHq-00075L-Oj for submit@debbugs.gnu.org; Thu, 02 May 2024 07:07:39 -0400 Original-Received: from mail-yb1-xb36.google.com ([2607:f8b0:4864:20::b36]:61589) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2UHp-000759-A5 for 70597@debbugs.gnu.org; Thu, 02 May 2024 07:07:37 -0400 Original-Received: by mail-yb1-xb36.google.com with SMTP id 3f1490d57ef6-de610800da0so3311339276.2 for <70597@debbugs.gnu.org>; Thu, 02 May 2024 04:07:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714648030; x=1715252830; darn=debbugs.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=q7Z0QhMFLE8t+MY0QgkujX3GZRw4SKmyn0R0WWQb6yw=; b=Ofh6N2jpLXA+dGNMGdV5qXBf4oim82qhUkyljnncDgtCHCJVeg4MuOjPFnonRFiLpB 6s/CuVGqZNWmvwru3R3MMKdk/AbdyoNTeF6bW5oQ1JrqPX2DzmtuGvtD0PJqAlkzBumH LgLmUMyPbrr4zIzIs9lFCO+7VzNKQIZyFzLAINID1tQeTF+2IznQmvWUqW2pHm+DOFey zWdb3SJS1NM3vvxmUL8pACfmFrCAH6IdDeUzKqEgURieksHyuhacnTB09HW4ke/xn6n6 NnZjOOizhinhqz6kYrdJcdVzKcNc7OGCYPfvogzQRfWXjKZhqigBLMqbvyfgsKiacnH6 cWNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714648030; x=1715252830; 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=q7Z0QhMFLE8t+MY0QgkujX3GZRw4SKmyn0R0WWQb6yw=; b=Pslx70hlWXN2mMp1gIPDIuCYdaKQfgl7UAhr+UDqlTxAzWnpokVGxBKertqNGIfRW5 qIfZlAdU3q26yxfDHMvKTVGGS41AlSqoXxOtDBNhkpR1ILJknw5RSReJqBL3a3wRVD6P St6J81nti4s4vLgW1mbIIWI4mDSI6cU9b5NjD51sol4dMGsrYcrS9jzo611QuVTVlS8P vFJNjxpc8ju1eiAVk9bXoUKTahyoZZN/FeKzDMrxQGK+K5FkjG11dx1XD/Dv5sy/XV6d zscQOIAdWxEEXhNoeS5/8gzmGfc64o92uTxiiztyjoVJoc8H9ei7LVzOca34efzwki2w dHtw== X-Forwarded-Encrypted: i=1; AJvYcCV0dZGN1LyUsz7GH4uusFc9xxFIom1jwt1DQ5XmEdG81wd+A+1vTO4J/uT0p6Bnmw0pc6exP0ymiT1kvQcMi9q6vqjxUSs= X-Gm-Message-State: AOJu0YyZOTvuq60LhCpbO0aOr4QqS4dfJgV060MtBH9BOoNMTrakheug iPtn8/ZPXSRSjRqMAi9cCUUkAMBnQzaxzJJcP8B3oqi3NYpXQ3FulSM9fbDUjaX5zTd+r6zhp2G 2eOhSC/SE/5lMhc2heYXfzNqvwE4= X-Google-Smtp-Source: AGHT+IHYf4+NK+xupQmM8azY18OHaLW+E3r3JaYsOrrwuGpCXfQqX3i9Y73p08Cp8Ugjpc5uPLxnL11NLkS6kWB36h0= X-Received: by 2002:a25:ae4c:0:b0:de4:5f9a:157a with SMTP id g12-20020a25ae4c000000b00de45f9a157amr1807441ybe.36.1714648029688; Thu, 02 May 2024 04:07:09 -0700 (PDT) In-Reply-To: <865xvwmus2.fsf@gnu.org> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284308 Archived-At: --000000000000b9823c0617769ac0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi guys, it's your call. But please change the doc string to clarify that pcase-let does not do "symbol equality" pattern matching, but only structural matching. Adding an example like the following will help. (pcase-let ((`(foo ,x 23 ,y) '(bar 11 baz 22))) (list x y)) All the best Marco On Thu, May 2, 2024 at 11:24=E2=80=AFAM Eli Zaretskii wrote: > > Cc: Bruno Barbier , 70597@debbugs.gnu.org > > Date: Sun, 28 Apr 2024 17:08:21 -0400 > > From: Stefan Monnier via "Bug reports for GNU Emacs, > > the Swiss army knife of text editors" > > > > > In any case, at a minimum the warning should be issued. > > > > I haven't looked at the code for it, so I don't know how easy it is to > > implement, but let' hope there's an "easy" way to do it. > > > > > I did refrain from using pcase-let after all, although it "seemed > > > right" for my use case. Having said that, I would advocate changing > > > the semantics. > > > > The places that already use it largely rely on the current semantics, > > so changing it would introduce a lot of breakage. > > It's not really an option. > > So I guess we should close this as wontfix? > --=20 Marco Antoniotti Somewhere over the Rainbow --000000000000b9823c0617769ac0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi guys,

it's your call.= =C2=A0 But please change the doc string to clarify that pcase-let does not do "symbol equality"= pattern matching, but only structural matching.=C2=A0 Adding an example li= ke the following will help.

(pcase-let ((`(foo ,x 23 ,y) '(bar 11 baz= 22))) (list x y))

All the best
=

Marco

On Thu, May 2, 2024 at 11:24=E2=80=AFAM = Eli Zaretskii <eliz@gnu.org> wrot= e:
> Cc: Brun= o Barbier <brub= ar.cs@gmail.com>, 70597@debbugs.gnu.org
> Date: Sun, 28 Apr 2024 17:08:21 -0400
> From:=C2=A0 Stefan Monnier via "Bug reports for GNU Emacs,
>=C2=A0 the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> > In any case, at a minimum the warning should be issued.
>
> I haven't looked at the code for it, so I don't know how easy = it is to
> implement, but let' hope there's an "easy" way to do= it.
>
> > I did refrain from using pcase-let after all, although it "s= eemed
> > right" for my use case.=C2=A0 Having said that, I would advo= cate changing
> > the semantics.
>
> The places that already use it largely rely on the current semantics,<= br> > so changing it would introduce a lot of breakage.
> It's not really an option.

So I guess we should close this as wontfix?


--
Marco Antonio= tti
Somewhere over the Rainbow
--000000000000b9823c0617769ac0--