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.bugs Subject: bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function Date: Mon, 27 Jun 2022 14:39:30 +0000 Message-ID: References: <71C43639-B441-4BD1-93A0-C8DDE1389529@acm.org> <87edzawcv8.fsf@gnus.org> 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="25274"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Philipp Stephani , Nicolas Petton , "47425@debbugs.gnu.org" <47425@debbugs.gnu.org> To: Stefan Monnier , Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 27 16:40:41 2022 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 1o5pup-0006KE-PA for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jun 2022 16:40:39 +0200 Original-Received: from localhost ([::1]:34122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o5puo-0006OB-Az for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jun 2022 10:40:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5puE-0006L3-VR for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 10:40:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59085) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o5puE-0003uR-L3 for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 10:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o5puE-0003Bc-ES for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 10:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Jun 2022 14:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47425 X-GNU-PR-Package: emacs Original-Received: via spool by 47425-submit@debbugs.gnu.org id=B47425.165634078012179 (code B ref 47425); Mon, 27 Jun 2022 14:40:02 +0000 Original-Received: (at 47425) by debbugs.gnu.org; 27 Jun 2022 14:39:40 +0000 Original-Received: from localhost ([127.0.0.1]:52970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5pts-0003AM-49 for submit@debbugs.gnu.org; Mon, 27 Jun 2022 10:39:40 -0400 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:55432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5ptp-0003AC-8n for 47425@debbugs.gnu.org; Mon, 27 Jun 2022 10:39:39 -0400 Original-Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25RDdKSb020701; Mon, 27 Jun 2022 14:39:34 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-2021-07-09; bh=ft+bsTh00Qlv3yx4h8+j2u9jmiUyYx1ZG5bOEZqzVkQ=; b=OJDebWaoNfVSZHuFrJzQNkofNEzXUoriQ1v5izUtjAMuMGtUCFmEAtZ2qJ307LxKX7eC WqEap1DtQ2KX1TGpYAxSLKe9uEym5m1KNhH5BcFfowMjq9jU+IPA2dk7TGuXAEK1qNTA xSdS6hR6+MHyyOapbP/DwrLrm+y4SWAPnN5vT3H+g3Npx5S//FCnzLhiM2aNwTgko+7k 27hk4UGjVpw2gjMhHlxzzWAwZxifXOWzWXTz+SyqgQ8grYWBt/PO1kcdyJs+JGsfLBZC AYGUcqffNNz/EFAdLjHCAMOYq0kfF3UeRQ/Lyq1f7mtO7wzaW4GiuYi0xDV9Wq47hByq AQ== Original-Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3gwt89ubtf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Jun 2022 14:39:33 +0000 Original-Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 25REV0gT036315; Mon, 27 Jun 2022 14:39:32 GMT Original-Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3gwrt73mgc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Jun 2022 14:39:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UHvgce/7I61LrJNjYHW3cnIffThDdhaD5KQCZnBW1GZ9BI8swFpR36X6UePSZDTohLO1SeGx/QBp+eoYYHO4GOTR1JVmJGZaX640VHKG4SS21pnVCQJf1ue3sf0nbLGMC1uoUgXtClOoJ4KYswXKm5jMpTK5uBMif/A5v2Nxx+dqBynI/w/lyyobK0s9ZvsIJ6fU/zSc3MOn8RaxVXoOeti/1UfEeVd79QnaOFYNYIoC4RTh3CvjaXKK/JpXIyxXpiel/LeQsI4hcV3FMNtVxpWwH40Hxfe0RAsRrbEOiRVZNeVXafBmQkJ0xk1Ax56ZP54kZ76wDtaJ4+JBwJup/A== 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=ft+bsTh00Qlv3yx4h8+j2u9jmiUyYx1ZG5bOEZqzVkQ=; b=NTayQfurhu3y5LpNhv4U84MrtnuQCrZhaalN6LNzScXzvLy2R9MlXFHdJOQRlYxCGQt5NhiQNR+xE9bTGAMuOLdAaNN/8JcjNRHYHARG+W6ZaWMK8HmQEPnpt1D9vpEa73vWvuZE8yxlVm7r2FvoS1C6nhkWlqBbWM9WQYg/LbmBKxv0Bf5/2qavu1KE5awHak1ck7IyNkqQJLfsju/a90Zwoz4VLhs5qF6Pdh1zpix3YT02QlTemp9lpbkmjELZsERI4IqGpkbKDgUglSZdG3CwuN3UD0+W9fVs165xujWO4SIH2NL4H0ZXPqorESQ4Au/aSoFFJS+JY0SQodTslg== 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=ft+bsTh00Qlv3yx4h8+j2u9jmiUyYx1ZG5bOEZqzVkQ=; b=x6Zt6c67QjA5QQFBht6ZFTePiUT8GOrpIqKYWVy0F9xwkfcoRC8rMvwFID+zR3JBYBsfrUyAhHzwa7IfxzJzYjSX7sTUciebwf/BxsLFEmvd4xBWsgZQ5sUT4CGSUpB/4LLENnq6s/jtEUlmES4j04kR3idMKyL2ntZfHe2q8y4= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by BY5PR10MB4113.namprd10.prod.outlook.com (2603:10b6:a03:20d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15; Mon, 27 Jun 2022 14:39:30 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::581b:ae2f:16b9:80fb]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::581b:ae2f:16b9:80fb%6]) with mapi id 15.20.5373.018; Mon, 27 Jun 2022 14:39:30 +0000 Thread-Topic: [External] : Re: bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function Thread-Index: AQHYih/71iA+JEWL2UaASfnLQYYZcK1jTPrA In-Reply-To: Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 10cae375-3b2a-49fa-56bc-08da584ad7fb x-ms-traffictypediagnostic: BY5PR10MB4113:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Mz/kCZxJB/DR76NkQigskEkLjWc0lhdSRkpxkpkr0lcc+1aDBlrd6VtimFsw+mjz7zISyLig73RZ04fljkZq6UlSibmrc1SJ4q6dH/42xMG5DQR/rzW4y91XjiZPNGalj5uux1/N68c31Yn/Ad4FuaVjZUZwV7kvFHGd3aVfL145nVrYprajT/K4lUCPII/EHkMQVKcvDH840kvINqS5JaZ70vlSmo+8tg7VDXqQE7i2UR6Q3OODAeC+ZOvK9cfcX/mfWpc4FYZp0cuKjESoVjXimjXcDPW9UuWq/aCiPw6hgrzt7fCWm84TsytSmOmIst/o8bzEpezLTcOmf34QcYL6UGkHCL6FMMddA2uB7DhYfIUgHbZlFPjig/KP2KqD7WzT7CyPaoP9UTdThorf5dqQ0OCcN+4/scVcU/PwjZ7yRH6J20gZTSs3xy6opWDv1tUHnsUEUtAT2Vucq5h+vl8SAtTg7kmxfldqji8xm8ThcDqsENxoJDTswBXvY0Kbs6bIOIJDu9w8iqiZb3ijYiGeU6rSXylkKDVZVRMOlYS3CCZI0utz398+kgSDh8QV3bXrXcL04XCOaEWbhGH4LSnTPBRUVHNbv9RIRzhLf9Q985jfghUoNtJ+19WTooyje2r0yLlgfDZnwFNMLWqgA35nRqLWlMQsOIw2lH8csf0jPK+u67p3ioo8p3sCRM9LyZ6zakUeqsAfNwQrMTuKapvb+r5tAnLBC4jF+OsJhHoo9oPf/0MUf+1JIb66h 63mYds6AKc5ekVArSPEHVz2gPZXFJr/hBxmtstkdfDT7YvQ/pBlgn3J+IrPGCT3wE297To/iyIIBOKw4qlZo5v/3g== 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:(13230016)(376002)(346002)(396003)(136003)(39860400002)(366004)(66476007)(8676002)(64756008)(66446008)(5660300002)(4326008)(33656002)(71200400001)(66946007)(66556008)(76116006)(478600001)(38070700005)(38100700002)(41300700001)(8936002)(186003)(52536014)(55016003)(54906003)(44832011)(86362001)(316002)(2906002)(122000001)(7696005)(26005)(9686003)(110136005)(296002)(6506007)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: nOvZsMRiX3ei+s+gc7aOa1MueDpMpIHx6gX9i7poeuT6cgbGdo4eoybA7kjbpQoCAd/3/8JEOkcU/JhVyZUX3UJNBNQ4BFHxdi4JYRNSGhO8+KUy1sPXY1JE4R0zgb5SKiAzJlDoR+MB0rRVKlDXuhYQc43/lmNpmVB2AxQHEgKXFuw9gCbyhTWL73+t40fpH5LGJt3irBGWo8a8TAlXlHxyg981sxXfLtdgh6H20UXkIDMQiKkFexw1x+Bz7WbQ2yxwCItDHC4i18rkMpmGDu8HU8qV8DFq+TZPMiv3TGZszCmQOv/Agp2N38u1B30npGDRsxoFovUq1NOEdCfbbMv/nkbIEA/szBBOQVo/muZ7eyYaX85C+kMjtvfp+LYqvEcJQnfeJ9nnpuEdRkG/GcR9xoWIin72ZID/yU24xXEIfaq7xCrWndYNkXYQSVBpm7BLbh0QeTnRsU1axa9GO5E+9S1+PMA6ojaefMAs1Zw1RO5YHh4jhpmOJ2y40r9YB7oXAS5CY3EBiMzFMmApZTNRGLUvDmb5zir62oMcyQ1S1hxDQCzTQDP6dN8IGu3+yHHUwkk8fcK9WvXBTvgN1b32EFy8P/Gz4USMNpynON63zVtwwO2o6aGe6wL29q5fXKZOEEj3dr8zasv5KVYGDyyl8azQbWa5S1e8SY2R8FpKbi8YMlCWM16fISwMcBZ9RLDcLUrRCoTveFgRH40okiIrXR8T5VPJX85nV3dHL9fUkVEgd6tRVU3fDb kDUkWMifN81hZ1jS0qD8an3D5Bq50faFjo3mrk7wR0zSy73vWaRrc9kWz+uSnqJz4DV2yR0Us6zHlT9OAuGF3pQegmZ8ddafDW 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: 10cae375-3b2a-49fa-56bc-08da584ad7fb X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jun 2022 14:39:30.0275 (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: shQV52Euh6N2QM5ouZ5uFlZN7hDwfyUX8VdMupF5668RvYi7bXNCxvnD7DXBaFZqgzDw61pbb2KQUyRRdHowKA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB4113 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517, 18.0.883 definitions=2022-06-27_06:2022-06-24, 2022-06-27 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=503 suspectscore=0 mlxscore=0 phishscore=0 malwarescore=0 adultscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206270064 X-Proofpoint-ORIG-GUID: 42PGRZWbuaOLzuy00aCtZ6YU-DGf1PVi X-Proofpoint-GUID: 42PGRZWbuaOLzuy00aCtZ6YU-DGf1PVi 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" Xref: news.gmane.io gmane.emacs.bugs:235462 Archived-At: > Then again, plists should never have existed, in my book. > They're just strictly worse than alists as datastructures. > Their only advantage is that sometimes when you write them by hand it > they're somewhat more compact (fewer dots and parentheses) but for > those cases `eq` is always good enough in my experience. > > I'd be curious to hear of a use case where plists are better than > alists while at the same time requiring a non-eq comparison. Wow. Stefan and I actually agree on something. ;-) (Well, I wouldn't go as far as saying that they never should have existed. But as far as listie things go, they're definitely nowhere near as useful as alists.) But whether plists should benefit from TEST functions other than `eq' is unrelated to whether alists might be generally - or even always "better" than alists. The fact is that some users use plists, even when they could, and maybe even should, use alists. And this is likely to continue, if not increase, due to experience with other languages and other key-value representations (JSON etc.). (Yes, IMO the manuals could tout the advantages of alists more, or compare & contrast plists and alists more. But that's not a reason not to give plist functions an optional TEST arg.) Plists with, e.g., string keys aren't uncommon, and that's likely to continue. That's kinda the point, here.