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: cond* vs pcase Date: Wed, 7 Feb 2024 17:09:26 +0000 Message-ID: References: <822c332c-1a85-4454-8978-0b1491981058@alphapapa.net> <874jek5r0o.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20629"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Adam Porter , "ams@gnu.org" , "emacs-devel@gnu.org" , "philipk@posteo.net" To: Po Lu , Arthur Miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Feb 07 18:10:36 2024 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 1rXlRT-00057d-9F for ged-emacs-devel@m.gmane-mx.org; Wed, 07 Feb 2024 18:10:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXlQY-0005vP-Cz; Wed, 07 Feb 2024 12:09:38 -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 1rXlQW-0005vG-8z for emacs-devel@gnu.org; Wed, 07 Feb 2024 12:09:36 -0500 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXlQT-0003bt-PU; Wed, 07 Feb 2024 12:09:36 -0500 Original-Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 417FxSte009122; Wed, 7 Feb 2024 17:09:29 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-2023-11-20; bh=0k4Xoh3Q1OLz5GGc5hoWtDhIlp2VjlfPlOGYmxbdeDI=; b=ofBBC84AvTIEG601DkLlGTGFKTBWLgvU3C0xr8xK3VFIWEjFcYEF/7ZC+P93VdEM2efy CEz8zi0M5D5U+ErP+4UylDNQfYSDLu7rW9kygiVc5mXl4TT6Cw8Xo6GY8HKDBFRooqAy mktpft36Pk9rDnK+h84qEtvb8+rAcqZ09+KDvGQyxAr2/vSxmju8GyyEgztq7yzJbBh+ b+fE6WHKEAOX1DEJOmLVQaPpUfMcCyTax05vFz6Wy9LI6VNKK0ot/gsz81rktkZjrxSB JpvaCvn0r/aeN7mW5y+D8ucHQiM2L3h6MIzzza68I6GzAxksnxbWyvm71VyhdvczYZEn Fg== Original-Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3w1dcbj7ar-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 07 Feb 2024 17:09:29 +0000 Original-Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 417GE727007103; Wed, 7 Feb 2024 17:09:28 GMT Original-Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3w1bx9ms0n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 07 Feb 2024 17:09:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IGDAtn8KVmBWavjZsG0Eb7N3gptOYPoazWJpU4dW2aGtyNZIVJ7Ajl1q/wsy/H3aQ2v7tbQEfI/ZUMuvnhALXb5H+4C8KXeSsvuitZmrLTOlUP6O22SXrfAHNw8lzW6a1RaQPuM293xnmlv5gr0KRvXIzsQhFTLdJME+QPmCkvMVIUrWzW8aMLvavee0RjUt7dc8Mu3Da+0es/DkoxK1MchbvrhdL+J8UyXHNG0rTXql+jl2EJWN8Bo0AfskGNqd3RIXg76BtWoNGkUxKqMGG/gQM+O78MzsVlHBYXQsVlBWwh2l6ctSavnTBMpLyYAQfuQOteYwGDMIwgZzFWWa1g== 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=0k4Xoh3Q1OLz5GGc5hoWtDhIlp2VjlfPlOGYmxbdeDI=; b=PPXt0FUz6jMaqYqQeUffl+AL9YkNtNGcTBJ4wvTksvS7dWM2yPTeBcsFkBnPd9sQyjGwxJy29bHHuizYM0u0/BadGw7UaY2JX1E8GKJiuSL+5noCnXfNU8y4BRXgHkWe6iTfLx7cYY4iSV7kgT3bPzbnsiRZaenC6Q4S4sXmJSYLFpJx3FmgHpwJbYXsmc91JdC0Kx9hYDjfxchMu68d5O6Yw3NLleqLZWmM/z376Hzg3eJscFMc3++BcCmUtQR+B+lr/LceLri4Q9Pvewwakd5QamMMvKK2oiOHx55a2E4toKJpBdjRSEb2YN9NvClLxt9wSHkJcrxcgG75xxs0rQ== 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=0k4Xoh3Q1OLz5GGc5hoWtDhIlp2VjlfPlOGYmxbdeDI=; b=YkszmzfnYOUriSh0IPO6Hw5/vBivXcMaeOoXqFnTdVhxgO3D4ogAgDZgdNHsRMmPdRUXDzstu6Ff3vw9Db3vSEmVvHaAyDfcoR+Q1InyoIlRgWw+WAw9l7z84jLdNjcPN0+bhKcjiWwzNlb1J/D7Fl9QlAwSCb8CikH4wS+hMCk= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by DM6PR10MB4331.namprd10.prod.outlook.com (2603:10b6:5:222::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36; Wed, 7 Feb 2024 17:09:26 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::7eb0:e361:caf4:a410]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::7eb0:e361:caf4:a410%4]) with mapi id 15.20.7249.027; Wed, 7 Feb 2024 17:09:26 +0000 Thread-Topic: [External] : Re: cond* vs pcase Thread-Index: AQHaWcum8aDmPOdXf0WASgu0Za9dj7D/ApPg In-Reply-To: <874jek5r0o.fsf@yahoo.com> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|DM6PR10MB4331:EE_ x-ms-office365-filtering-correlation-id: 11b5091d-28fe-41be-d18f-08dc27ff89d5 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: yQbvTmFNSC9yU0D0SS+D7vVv86ilfb/VU5NkadvaHcdszrVquzljVsaaq2usj9miWr8NIqG5BMq60IgtC0aTVR/laA3b81a/hHPaiFDN8SM4OpSvZ0fZdSu89o7b4QE8M5lLaA7hu+TuYD6ty5iA1VDiNHXhzzPGDBti6z9gJ0mKH6WSIBP89Nqyh/fqXN4YDMMicYpy2Zy66o9b3SC8kRxDlfu/dqNLJqhWEYkJlpaEKyrUBtssCcVodRunbAHqAD8JycNhQI5aZpsgV+Buya1eSPhimVOUSftgPcPqkx9X0AECrX5FODxXdEWM8bw2qa4sKm9dXhgfXlbTGfL1OKyj5SzyVop1pO6rgcdca4SzxFgBpwrGw4FW7tdgltPEdGAEfyny5H22D1G7nyLBS8p5lkCLfG14uleYcUSnkFkvU0sznRrArpsurIFcOZUKVWXCayslxNwOgn1SefnyllcRt2EfZsiETKM3ESMUALYGnFKCOjRZU3HBPmmn8/NuSYjtiC3u+JYyI7mzWaWgr11O0sEHwbrbduKT3tq4/i5/XobsfcH2yHEv5AxToxLS3GBDI7L6hobsSss5gWamNqOZfsjMgDRIHY5vJZwJQCUNIMpDph7QUYp//gPQ9gmi 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:(13230031)(136003)(346002)(39860400002)(366004)(396003)(376002)(230922051799003)(64100799003)(186009)(1800799012)(451199024)(122000001)(38100700002)(33656002)(6506007)(7696005)(55016003)(41300700001)(86362001)(478600001)(52536014)(8676002)(4326008)(26005)(9686003)(8936002)(71200400001)(44832011)(2906002)(5660300002)(66556008)(110136005)(64756008)(316002)(66476007)(66946007)(54906003)(66446008)(76116006)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?mZ5Uu01i/oSPEpUbBOKo/HQl3JWJH38TKqgQFEqXRWlI6tHZj8v7pl5CtwxI?= =?us-ascii?Q?Tq22jRMWd7un9/+35QacUb7DqcfV+98XViv5iIKTqor91JLdvXv1HCaB5TUJ?= =?us-ascii?Q?kQDSxkSVNne2+epdk8HyDW7hXH9RbjSxDEUAulnvpYcHOkGZV/PNZZS2gMd4?= =?us-ascii?Q?Ns0qGZPjVl4IF3DZ0kpYLDpYqOIgXv2n5ZmqY/c55nIA6C1aIxnrYou7rPu9?= =?us-ascii?Q?HwD/WxzMibyQJdl2vt5av3Kg+Rz6o4chBU/enbzurdmEOSV/dvW1hD78AuFx?= =?us-ascii?Q?fOxyCbj1iarXEXA3n0iVA5UvuYv/uNCnC5xtsGnRudip0JgUzytBtf1PXO/U?= =?us-ascii?Q?MQsQZG/q1bFnWYZMGfqYEspaU6YKW6y1XGdtJj2bCCgE7ILhUn9jtl7U8ta4?= =?us-ascii?Q?BWwmGMWoPNvNFNrOIj4OLKyBEaSzvzaOKMEfeVopelWgXDj3coOsx2KHUM4Y?= =?us-ascii?Q?L7CQU7ytqB+bs/kctg3Zk4KHmaxbxTn1Dcq/LdZOz7qWrKJppI3taja9wrnF?= =?us-ascii?Q?eE4a/xKPggDbltyMbtWNf3Kf2rKBtOdb6tVwwg6vlh0nHC/T82CpirszreXE?= =?us-ascii?Q?fHD2vxu06wKVW8N+y3ABY4KB20L7A4j2yGMA2ZhZx2ZVlfzjo7jzJLYm9HST?= =?us-ascii?Q?gw X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: cbKszk17+Tq0L9v6PhVwHezVob+1zjQhUSalmT0RDL6QUKKXf7iaXjMvyMIczvLzYGFFGZ9Ia3XwQoISw2hGNwfnxz37dgkCAAglsiWHh5UIed8Nf6tFBmPXb7QNZSZjfpjFwlNg8SIqGXTTfsCVZ0mTsNqNUM2hyoDLdt3Ft3NoM1B/8+hdQ89ylQZY47NCbX5n2eVYGglTOZusyS6em2H9iYF5Y8fClbmxlHIJ1d1IQLwsfqSxfovn0rZ6gtKcAyoVGMF0yf0vV1KwKW+1vm6lAdTx7okrt4vPqpybc0lCNT1FM61sIUSCxmXIPyhLcCBTVYT3ZyZFe9E5t2BKyp7d+epZ3RYe2lhEP/YhQrpnbKOsCuZ6zlYpkm2sMTQNlSPynn6RIRMyzZWKJX9LPTEt3H6eUWHkoKMmmdXp8Pe6H48NyDA09DKTv1T+QjSj18ODlBh2TryfHLiU74JjfDmKn1CGmA2xGb5jb2yGiBSLVrmAa6tTW/ACcS8rvzT+fQuiLAeG1XDzA14M7wJcZTYZ3Mbxht2kH73RsAfQt/hLhxjh9UrKCETw66olI88JYzmBtiR/hB2enkq4N5/ixJxUMFWaVSGpsNUUUHEOEug= 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: 11b5091d-28fe-41be-d18f-08dc27ff89d5 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Feb 2024 17:09:26.1788 (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: ZD0WSfLiB8cssP+EuAa4WV6QnCiVg95aSbBlzVyRFFw7bFG1/NexNAofXyMN6/vkrBaTof/S+Igwj5ANKiRE0Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB4331 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-07_08,2024-02-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 mlxlogscore=342 bulkscore=0 mlxscore=0 adultscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402070127 X-Proofpoint-GUID: 6SfKLn6v5YCRT4eFpP84tK3QD6qmeuAj X-Proofpoint-ORIG-GUID: 6SfKLn6v5YCRT4eFpP84tK3QD6qmeuAj Received-SPF: pass client-ip=205.220.165.32; envelope-from=drew.adams@oracle.com; helo=mx0a-00069f02.pphosted.com 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, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:315982 Archived-At: > >>> (pcase foo > >>> ('bar (do-some-bar-stuff)) > >>> ('baz (do-some-baz-fluff))) > >>> is not more awful or wonderful than: > >>> (cl-case foo > >>> (bar (do-some-bar-stuff)) > >>> (baz (do-some-baz-fluff))) >=20 > Sorry to interject, but this really suggests > that `cl-case' should become, simply, `case', > in subr.el this time around... Dunno if it suggests that, but yes, I've argued that for a long time. Emacs should just adopt it as `case'. (It _used to be_ just `case', BTW, but it was in `cl.el'.) And it wouldn't hurt for Emacs to allow an optional TEST arg for the equality predicate. That also serves as the membership predicate, i.e., for clauses such as this: ((foo bar toto) (handle-foo-bar-and-toto)) (An optional KEY arg isn't needed, since `case' is simple - it uses the same part of the input value for all clauses - just apply=20 whatever KEY selector you need to the input=20 sexp. Another example of `case' simplicity.) And adding optional TEST wouldn't bother=20 any existing uses of `cl-case'. `cl-case could be aliased to the new `case' (or not).