From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Dr. Arne Babenhauserheide" Newsgroups: gmane.emacs.devel Subject: Re: Warn about comparing quoted lists (etc) using `eq` Date: Thu, 15 Dec 2022 07:34:10 +0100 Message-ID: <87359h8968.fsf@web.de> References: <8D624413-5A6C-46D7-A4EB-53C23F7CC4D3@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40691"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.8.11; emacs 28.1 Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , emacs-devel@gnu.org To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 15 07:38:21 2022 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 1p5hsq-000ANk-QE for ged-emacs-devel@m.gmane-mx.org; Thu, 15 Dec 2022 07:38:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5hrz-0005XU-2F; Thu, 15 Dec 2022 01:37:27 -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 1p5hrv-0005Wu-L9 for emacs-devel@gnu.org; Thu, 15 Dec 2022 01:37:23 -0500 Original-Received: from mout.web.de ([212.227.17.11]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5hrt-0002Bo-Sm for emacs-devel@gnu.org; Thu, 15 Dec 2022 01:37:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1671086235; bh=sFbL/Y+++oFrwpWnZ/5RNMUpbM2cK4dljZPJDZmO9M4=; h=X-UI-Sender-Class:References:From:To:Cc:Subject:Date:In-reply-to; b=sVCaT4CF69HTX+3ST3BwxX+9keuFEF/b+W3tCoCweS2DbuhbVA2zBVqZRYwv9174B qSXsF146CvG2yFDTTIBRW4TLVftzE2X+ZSJ0T19W188JwrL+5UTXZiRfEi960et+Ex AqUt7axi57Qs0hHogc1XQhya4d6/4awD35MzdGXZh5m/uGzNpXo0oIFWxBWxzdcIhi SvgAZAg8xWHgRXeIygxmgroPX9NlyQs7ylvluzKGiT9UgT6j2ztumu1NXLnbYZq+/S wvsc6y9+jD0jkkzGVu2WB6B2kN0PsPN9UQXKJApnd4erQNq+bTGeSh1tbMw1MlBmGS XYveabDOJjoUQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from fluss ([84.165.20.127]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MOUxo-1pHDfR0NjS-00QJn4; Thu, 15 Dec 2022 07:37:15 +0100 In-reply-to: X-Provags-ID: V03:K1:f0yrxyLlEaSB6zDn9chb8fnUdB6S/C6/BLefSgMNpNMpbAoHPm3 09DOp/6uoRP/1HCvqCscw0qjkyeO3t0UhPL2qNdQzF5NAN6dWelVPIMfriPwU/YCWWnpK+n eseK8AOuL9VaxHvoCxYx8A7HHWoWvM33CBFKjSuisooKXO3ZtUbc6VfO2byTmRCu/KRSmq0 V3IqM6kM97lGTGoyUe1wg== UI-OutboundReport: notjunk:1;M01:P0:+/bOJg8/XrQ=;jkZRgqc2J3g0YmBcMFnYvNtYw9p tTLtFjxeO2P002ffv2F5nN/zaUk2sylZsBvVETuZIQfTFxfZQTFdI0SOAKYWkp4zLFtM955SR mpJfezr9HV8TPebYPbasYXD/O2SgBshKAZJsIbalWWSXrsucx4qt3620rHCqkP3BPUuHMNyh3 Ex2YHthlTwXclFwrgLFHATkJsR9QJfiiVH4KDxlO1NbdOVpXnbqj9F4JqEr1TIWgTTVfs7AXx KLvKNoF8inqqcULRnddgKvIiE22Vz6W3GxuIoJt63s3jnX0kwXQwGV3HSITXUL8QE8hMKv7Sg D6XyC8j1uz3gL2nsOY6VzZPSY/VVLPjH/blIV2yRhxUCQ3gaKnBGnxjMMQCqpAPPRKKbw7K54 HqZVn0Mv1HqfULUVFw41XtJg3h8/u7hCRbDxSxzs9iYoLgPCRXIfO8V5GJwf9VZv2Wr7AY8ht BPPe20mOS8rzAjFOMGy+Li6vgIvRaCX/cJN49qL0V3t+vs7eXXjce/S8qCswrYRiqPEPC4Ulq v0j6UQPXxkquZDcM6bHoQf1Uoyp8cBizycTZqSH45gUDgKyvNU912FdmIltFwmc1XHIBs/Jic dao1t3UynLbUC1qnJ0+yVLQnJ6MQpF2wPSk99cqY4IdXpCExFGqJq4Bt0CnA5wZBSYdKSfCv4 yDKU2OEDvCDeTEZDZHNFgE5vXC0xm2Dhk2lHDAsxej9+gE2CK1sSDE9TshHe6GoI8aViwqIuM mO0R87k6ScJPa36dpMK3L+fUVYP3YP5Fjvw6qp5p5FfIBlOnU+HG7FZ91KsarP09sWe/Vtqt Received-SPF: pass client-ip=212.227.17.11; envelope-from=arne_bab@web.de; helo=mout.web.de 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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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:301437 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Juanma Barranquero writes: > Note that your patch has a false positive with the empty string, which is= optimized to be always the same object (well, ISTR there are two, a unibyte > one and a multibyte one). > > (byte-compile '(let ((x "")) (eq x ""))) =3D> Warning: `eq' called wi= th literal string that may never match (arg 2) > > (let ((x "")) (eq x "")) =3D> t Is this guaranteed or just an implementation detail? If it is not guaranteed, then "may never match" sounds correct. I miss a suggestion, though: the warning as it is is not actionable. It would be great if it could say something along the lines of "... (arg 2). Consider using `equal'." Best wishes, Arne =2D-=20 Unpolitisch sein hei=C3=9Ft politisch sein, ohne es zu merken. draketo.de --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJEBAEBCAAuFiEE801qEjXQSQPNItXAE++NRSQDw+sFAmOawJMQHGFybmVfYmFi QHdlYi5kZQAKCRAT741FJAPD65XLD/0bNq5/DGnmyPnl5PwLaB0AVIcXIHdrveRo BJANfIvfrpmYFvsquBJa4A0el2j1Zmui85vdcq9sbo2Dg9imw9OsOrI3gzJAOP2D ZxbsnFW8V+gfGKM5v1cz1j++9NfF0y8aIDJ47PKlWZepoyXQ+6nsA6mRdg2UjilY aszYc9w7pGQHNZf2PrKEblrBSLEu8IthfX6xWMJOnboxNXwTF/BwEKSIDLvy8tYc PWG1jD8WgZs49ytFyPeK8/NZ1IYgvuA+ArJ/b2/T0rwgxK1R+d/t/wiXw+stkKp5 K5EJuX/cIWc07ALDeGgzsYicqgkUf7H3vEtv1cbiBlfR2ejKoYvGct590bysU0Cu euPTCWxVUrXJCCqyToHB8w2UfNM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