From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: [External] : Re: Warn about comparing quoted lists (etc) using `eq` Date: Thu, 15 Dec 2022 16:13:14 +0000 Message-ID: References: <8D624413-5A6C-46D7-A4EB-53C23F7CC4D3@gmail.com> <58A7E984-95CC-4F7F-817B-10E680E5966E@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3838"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel , "Dr. Arne Babenhauserheide" To: =?iso-8859-1?Q?Mattias_Engdeg=E5rd?= , Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 15 17:13:51 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 1p5qrl-0000kB-Fo for ged-emacs-devel@m.gmane-mx.org; Thu, 15 Dec 2022 17:13:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5qrU-0000Zj-LQ; Thu, 15 Dec 2022 11:13:33 -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 1p5qrL-0000Ut-By for emacs-devel@gnu.org; Thu, 15 Dec 2022 11:13:26 -0500 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5qrI-0001WC-QX for emacs-devel@gnu.org; Thu, 15 Dec 2022 11:13:23 -0500 Original-Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2BFEn1da004460; Thu, 15 Dec 2022 16:13:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=COO9gTjFJsyJkvaUfTbT0DF/b31RddfsskynUqcqpFA=; b=TiAJ1Feowenc5U5NfvwrPKkePxw1XeeJKbVB1eITrA2tHIaLY24DC7S9n9hXWXjZq8I6 RGcmTwggvaVK/2USC0p5W4BwHnn8fWyULnvcjaIW3+D/oVQSFlGXV3MQ0dey/qch4sf3 u/cucv/DRFO0u/07au1IBDJhSHCwRuNDtAVCiYqC+Xz5jHhOqJCdw+7/+QhcTYqabWhU OYpMJG53El/rmkeT8xPrIq5nRYO9+stMZS48Gpp65JImXKMjp1plCjsCgaKqrxkTi2u1 Wr/Ppd719usgkhn0ygbqwzgcoePXfA//N870pp0c/hw3IcCTySB4ZUU5mexPBSfBCK5/ QA== Original-Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3meyeudg9y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Dec 2022 16:13:17 +0000 Original-Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2BFFlwaq033110; Thu, 15 Dec 2022 16:13:16 GMT Original-Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2106.outbound.protection.outlook.com [104.47.58.106]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3meyeqwytf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Dec 2022 16:13:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hEDurirKLt/nds4Fw/KghyC4ipjgWgtE71W07rIGcijS2UUtCbcjc7ol9MmpLdweRhLUxsLk0CG+QE3agXSPnXlUodKCZCpgrHUDQSISUyLIVdaW9jrisCFh0KLwKP0FfYITAewungDNLumzo0rpo6Nz/qnUDKaYppeNoWbLcDN/xMebzc/MGhwrr4Oa6nmnAsNr44y7dkoQgJJy9ThyaDZMPVZX90brLlo3p4Elp4DyqhS1e9B9F7t97vWcgtgYAMyy66iFW1gESiwY9Xc8Xvxx1lrguD12NuziHVZagBKS6dAD5ORISyCrrtK0I0l1QYnCIWcwsp8U7h8HZ2AqjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=COO9gTjFJsyJkvaUfTbT0DF/b31RddfsskynUqcqpFA=; b=gxIrUKL7UX4Qvs1bTyCHWDT7G9pGJC5TiFAvKIDsPNysoO7ONc8m/5XrW+zFJK0RLuaMhr7I6DC9o7vK0B/4WWb4kufYElQc80AUeHBmnTDYuB6aJbphMNDqAmjG6bIFE87UOWQZxqnuPa9Iz0UUz4o9RBg7LBolY1rlU6EIpfSg6FePLeaN4AF7Xm7MzDpc1F0wlYyhCmlG0lWclg/dub+PcBunrKwIDbwy9/vdHWJ0ftyuOiCZfcOKTHsL9lZoBAR5ilE7tFrarnx9RoxKbAzq2DmneCMrVQuyaYKo+90qugT1OWU2bj7H206q5R2E3ZXoSerh2JyU1s4wYUonWw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=COO9gTjFJsyJkvaUfTbT0DF/b31RddfsskynUqcqpFA=; b=BJEex9vcYfyThR2D7JNizQ5yQBj8l9pWuavFRTYu1BinBFPcGhWXIRulc3yaE0bhT49GyPZyd/yktzQbGazAkgJYVnCGEGomEXfeNHA7Ogph0+xhjwl4HgrNfWxrgxxv6fmFqfAO9bWu9Pkq1FUcwsfIdOa5fvnoua7BLfWBQ0o= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by CH0PR10MB4859.namprd10.prod.outlook.com (2603:10b6:610:da::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.12; Thu, 15 Dec 2022 16:13:14 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::176d:3689:aa5b:91b]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::176d:3689:aa5b:91b%2]) with mapi id 15.20.5924.012; Thu, 15 Dec 2022 16:13:14 +0000 Thread-Topic: [External] : Re: Warn about comparing quoted lists (etc) using `eq` Thread-Index: AQHZEHHqLdWGKT5mzkuX/lorby1VBq5vHEZg In-Reply-To: <58A7E984-95CC-4F7F-817B-10E680E5966E@gmail.com> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|CH0PR10MB4859:EE_ x-ms-office365-filtering-correlation-id: 5f2491e2-07d6-4606-095d-08dadeb7451e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5rT4hhP5lMXjc7HoCbxQx9t5Ckz812UTDt51OFBbLW05GXM/bKqxKJNGiZHhntEAXrJGedoUuel/nerKDkOqBOcRP4kOxfg+2+HtKK2n67q+ZMHE1zK/2HR/wS7nROnEZtWKBZjhzoYKP7QG+RTy2MKVjJa50x9UlVjhgy86JGR+WlBfGn6MeGKpvtLrPZLo67P3o9SidE+Ix89wRXmFQopNc8BrRQzLw8tbgYJrG3oVlDjULVvqR+RhAr1Pp91I9EvSx7y316XeRleN6rVgYxRii4Vzy27bL9mOzEzqBJ6pGO/7SITS6AZHG+UA2guTQpW9ymDS7hR1cXn+viztbQIwU21nPM0DKBbaNPfCvlvvVzCJaDGkoZAEttDGVHj+mCD4LlWTb2SIuzwKoaSPYcjJoAbysIBxYTf7Op+GmRULiRHCkEW9LwHG8VXKj6DDqigB9U8j9GMK093zg1Z47xCHOQhy7pkhADARnQFCj5mriiXkSLgcylv7CVBKugasuUp2QDG8OuPVk59feQG9T77jG4oK1GCNkuRAP3VzxprMWRkPA8/UUAA8tLrkwxQCDDB8DiCO/S/OqaAQllZGKo3vqwhSqODiIpSQwBgAdXTCS7ZPPpeLweHsS6xun2HNBMO8wvOgoHHPTt1AD2rk2v9BGckeR0lWnXa3sCxPPHmJlRwyxAa98NSwJtQHzDDW2a/ec8s87UfZzAZahsqmcAHKhQ8QIF3xB3ori4He9cE= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(39860400002)(376002)(366004)(396003)(346002)(136003)(451199015)(44832011)(83380400001)(316002)(110136005)(38100700002)(122000001)(8936002)(5660300002)(41300700001)(52536014)(64756008)(66556008)(76116006)(66446008)(66476007)(4326008)(8676002)(66946007)(478600001)(55016003)(54906003)(33656002)(86362001)(9686003)(186003)(71200400001)(7696005)(6506007)(26005)(2906002)(38070700005)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?DG+Y6sZU+C9TjTxXpFSy2948OJy0TWdX19FESQPkPgmnzF7uAnh40uwkoI?= =?iso-8859-1?Q?0TqjOf7RLyvi1091Fe+QJY2cce/RDXIjqI6BQDpIonJN7f3EkWEIJd3KNY?= =?iso-8859-1?Q?iw8iiNIbLbOu1O1+4Tm/o3QkRJ3m+KBJ3DifdS5pZoTqjqU916UwbNIfpx?= =?iso-8859-1?Q?aTLOiYuymnkNnR0EeVcKIZoAVhLZ+a3lRetM5LHrgJ5r5e4srzNFFz2Wd9?= =?iso-8859-1?Q?76yVvbTGigxF1w/phOWo6UjJ8Ngga+ub0YBNubZNTq95GBrCdc70IHycf8?= =?iso-8859-1?Q?r2cMgxJgGGfgcxp5fw6ex9hlqMPqXm4qJ7Ra0x0oTy3VYCyebHoaHeBONW?= =?iso-8859-1?Q?X7jGB9+aZCDElmG0cifdFsg1BD9jtZfq0bbzllIiUFNW6+RlOHXh7uJ6//?= =?iso-8859-1?Q?Xw7J7T5/7JXsPp/pJ12RdFlwhF0vAAOBIyKpRvnySKfMUU1o3enf4RYFF/?= =?iso-8859-1?Q?62TtItHrDYLp+TenSWPQ7TfOxiaosUZvyDQoTX0IFDKBXBwPFDwjl3JDlp?= =?iso-8859-1?Q?Ls+IW0jm4WoMPhlFWMqzItA13xEJVSUq7OOHADoZ2OtE2sBPgVB4bpXbTM?= =?iso-8859-1?Q?9Y6XdpkGiIXoYapBYkamR2FvwTmXZTLv3dK13l8WQw8FZomdEJEOJuB9lR?= =?iso-8859-1?Q? X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5f2491e2-07d6-4606-095d-08dadeb7451e X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Dec 2022 16:13:14.5699 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: VyvWFDH52wxey2CxDg0n60iVUEAy7G8s+GgTaC7zqL0NNvJOQ9NiSMB5xjnJ0dbtbq+axtU5khPiuIhZi0+kqw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR10MB4859 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-15_09,2022-12-15_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 malwarescore=0 mlxscore=0 phishscore=0 adultscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2212150133 X-Proofpoint-ORIG-GUID: z8ll4Azl_hSQa2hKrNmQoQR58-K0uqUa X-Proofpoint-GUID: z8ll4Azl_hSQa2hKrNmQoQR58-K0uqUa Received-SPF: pass client-ip=205.220.177.32; envelope-from=drew.adams@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-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:301464 Archived-At: > > 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'." Dunno what the "... (arg 2)" is about, but the rest of that looks like a suggestion I made here: The warning could perhaps remind users of `equal'. It's likely that in at least some cases what they really meant was (equal x '(ho hum)). And `equal' takes care of all types (strings etc.). > While this sounds like a useful suggestion on the surface, it's actually > slightly dangerous: blindly replacing `eq` with `equal` (and `memq` with > `member`, and so on) No one (at least not I) suggested such a thing. Neither my "remind" suggestion nor the quoted (?) "consider" suggestion imply or even suggest anything like "blindly replacing". The point (my point at least) was that some users might mistakenly use `eq' when they really meant (should have meant) `equal', and a reminder about the difference might help then. On the other hand, I'm not a big fan of _warnings_ (apart from byte-compiler messages, and even then most shouldn't be considered _warnings_). > What we really want is to make a human look at > the code, and think. Precisely. And when doing so, at least be aware that `equal' exists and how it's different from `eq'. To some users (esp. new users) that may not be obvious or front-of-mind.