From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier <monnier@iro.umontreal.ca> Newsgroups: gmane.emacs.bugs Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work Date: Mon, 04 Jan 2021 21:06:27 -0500 Message-ID: <jwv4kjw16nf.fsf-monnier+emacs@gnu.org> References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@qq.com> <877dos50su.fsf@web.de> <jwvft3gtxfb.fsf-monnier+emacs@gnu.org> <87wnws2w3o.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25662"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: jixiuf <jixiuf@qq.com>, 45619@debbugs.gnu.org To: Michael Heerdegen <michael_heerdegen@web.de> Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 05 03:07:14 2021 Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org> 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 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>) id 1kwbke-0006WD-Mv for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Jan 2021 03:07:12 +0100 Original-Received: from localhost ([::1]:53184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>) id 1kwbkd-0006g4-HP for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Jan 2021 21:07:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1kwbkU-0006fl-9Q for bug-gnu-emacs@gnu.org; Mon, 04 Jan 2021 21:07:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49154) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1kwbkT-0005P6-T1 for bug-gnu-emacs@gnu.org; Mon, 04 Jan 2021 21:07:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1kwbkT-0004yY-MR for bug-gnu-emacs@gnu.org; Mon, 04 Jan 2021 21:07:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier <monnier@iro.umontreal.ca> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Jan 2021 02:07:01 +0000 Resent-Message-ID: <handler.45619.B45619.160981240119086@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45619 X-GNU-PR-Package: emacs Original-Received: via spool by 45619-submit@debbugs.gnu.org id=B45619.160981240119086 (code B ref 45619); Tue, 05 Jan 2021 02:07:01 +0000 Original-Received: (at 45619) by debbugs.gnu.org; 5 Jan 2021 02:06:41 +0000 Original-Received: from localhost ([127.0.0.1]:60697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1kwbk9-0004xm-4L for submit@debbugs.gnu.org; Mon, 04 Jan 2021 21:06:41 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:49982) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@iro.umontreal.ca>) id 1kwbk7-0004xX-9t for 45619@debbugs.gnu.org; Mon, 04 Jan 2021 21:06:39 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A9C35440B7A; Mon, 4 Jan 2021 21:06:33 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3DCDA440B3F; Mon, 4 Jan 2021 21:06:28 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1609812388; bh=QMQ48ond9ROYMOfBtrALnvlUK8pp7m3ZsOHjWVBAAas=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=I4m7qC3n5F2Vasp0qJ8UkgzSqoiYukK0gcSrIooicbhrKv3P6fAh66o6fiEI/nCzq 6sAGxFZSkN55OjiM8keP4SRmAwnHzfA/+N2Bn4Z7KpP0BYMJPVrMwXeQEapDxOjjQK 6X3Sgsfbgqzq+jxfFC8yLPNLDVQtRjCCteo4x4CnGUgZouChHqro7pS25JV67SAIGH ln2BnlndgRVgEfwLBqJY1nSs66o2Tib6fw2d98Pd9OqbEEJQykc6tjdQKQiLr7Qu7o ItWwDCUk5ppljHfmGkwwzkRdNA7r94I7hlIFZhQsMByIMQ0vYiQEdUzekYZYxVu0To QTV7WCHIoeWTQ== Original-Received: from alfajor (unknown [104.247.243.191]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 01B8D1202FF; Mon, 4 Jan 2021 21:06:27 -0500 (EST) In-Reply-To: <87wnws2w3o.fsf@web.de> (Michael Heerdegen's message of "Mon, 04 Jan 2021 23:08:59 +0100") 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" <bug-gnu-emacs.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>, <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs> List-Post: <mailto:bug-gnu-emacs@gnu.org> List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>, <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe> Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org> Xref: news.gmane.io gmane.emacs.bugs:197349 Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/197349> >> It's messier than that: the issue is that it doesn't bind variables >> which aren't used lexically (this is needed to avoid spurious warnings >> about unused vars when the var is used in on place but not in another). > BTW, a similar issue (pitfall) I faced was that I sometimes expect that > when a variable is already bound, already the first appearance of the > symbol would be turned into an equality test. Hmm... so-called "non-linear patterns". We should emit a warning when the same var is used twice in a pattern, indeed, to avoid surprises. We could also do as you describe but I'm not completely sure it's a good idea (it begs questions about which equality test to use and when it should be tested). > I wonder if pcase variable bindings could be hygienic in the sense that > they would use fresh symbols internally. That would maybe make the > semantics clearer. I don't know what you mean by that. Can you clarify? Stefan