From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#36139: [PATCH] Make better use of the switch op in cond forms Date: Tue, 18 Jun 2019 14:56:44 -0400 Message-ID: References: <68467ACF-DA49-4EBA-BA3B-7339DB22A456@acm.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="221121"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 36139@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 18 20:57:08 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hdJI4-000vPA-ED for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Jun 2019 20:57:08 +0200 Original-Received: from localhost ([::1]:32890 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdJI3-0008FL-GZ for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Jun 2019 14:57:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34290) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdJHy-0008FF-Rr for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2019 14:57:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdJHx-0007rt-TC for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2019 14:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60285) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdJHx-0007rc-Pe for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2019 14:57:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hdJHx-0005WS-M6 for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2019 14:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Jun 2019 18:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36139 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 36139-submit@debbugs.gnu.org id=B36139.156088421721216 (code B ref 36139); Tue, 18 Jun 2019 18:57:01 +0000 Original-Received: (at 36139) by debbugs.gnu.org; 18 Jun 2019 18:56:57 +0000 Original-Received: from localhost ([127.0.0.1]:45596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hdJHt-0005W7-Fk for submit@debbugs.gnu.org; Tue, 18 Jun 2019 14:56:57 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:39417) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hdJHp-0005Vn-83 for 36139@debbugs.gnu.org; Tue, 18 Jun 2019 14:56:54 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 99EF681171; Tue, 18 Jun 2019 14:56:47 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 141B280E0B; Tue, 18 Jun 2019 14:56:46 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1560884206; bh=QYULeppMHyo/QkQT0nsx3f4VBNWJWxeBU6a9YqhTLCU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=kSF1VynXJgxB9FbeBDKwzoKpklIMqgSwzmfPSA2QpQtzWTycyilqHPKCXyQAFAIMg tIUZXwC7eD8+IrVvOx6aOPvryuXuTkKHPSx0QRB7PhSNJ7FTiZ8SmCFMyKPAjqKBsk u8p/A+/IqEE0PNeTl+kT2wbY2dXZQmd8JJAdzp3Vaj/BuXDJz139LwZ9ieLlx+76NA z+St97+yheAdFDtyZP6us5bh+WHNzmXFTDdxLe9BDK4cZXnfQlufG2fkolG9n4ighE iPBFcG3tUWfkzm4ZTUZ4RLszrcIk20I8oGi4COxiv95E5Oz91c+1I1qGyW2/sf/989 dAt0v+DYNyRkg== Original-Received: from alfajor (unknown [157.52.10.58]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BFC8A120AD4; Tue, 18 Jun 2019 14:56:45 -0400 (EDT) In-Reply-To: <68467ACF-DA49-4EBA-BA3B-7339DB22A456@acm.org> ("Mattias \=\?windows-1252\?Q\?Engdeg\=E5rd\=22's\?\= message of "Sat, 8 Jun 2019 16:40:07 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:160792 Archived-At: > Allow switch generation with a mixture of eq, eql, equal, memq, memql and member. AFAIK all of those give the same result (in practice) as using equal/member: I'm having a hard time imagining an eq/eql/memq/memql test against a constant which behaves differently from equal/member except for those that can simply always return nil (e.g. (eq x "toto") can always return nil since there's no way the caller of this code can make sure x is really the same string object as the "toto" generated by the compiler). So I think we should "standardize" on equal/member and mostly disregard the eq/eql/equal difference (except maybe for emitting a warning when comparing against something where `equal` doesn't give the same result). Stefan