From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: "Alfred M. Szmidt" <ams@gnu.org>
Newsgroups: gmane.emacs.devel
Subject: Re: [External] : Re: cond* vs pcase
Date: Tue, 06 Feb 2024 12:41:44 -0500
Message-ID: <E1rXPS4-0003ZC-3z@fencepost.gnu.org>
References: <DU2PR02MB10109F1CBA5F7A8D78A597A5D96472@DU2PR02MB10109.eurprd02.prod.outlook.com>
 <E1rX1UK-0005Ip-Ff@fencepost.gnu.org> <87il32iwmm.fsf@posteo.net>
 <E1rXO89-0003Ll-3B@fencepost.gnu.org> <87o7cttu4l.fsf@posteo.net> 
 <SJ0PR10MB548817CF1242E8DB20D3675AF3462@SJ0PR10MB5488.namprd10.prod.outlook.com>
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="4527"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: philipk@posteo.net, arthur.miller@live.com, emacs-devel@gnu.org
To: Drew Adams <drew.adams@oracle.com>
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 06 18:42:34 2024
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>
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 <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>)
	id 1rXPSr-0000yL-QQ
	for ged-emacs-devel@m.gmane-mx.org; Tue, 06 Feb 2024 18:42:33 +0100
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-devel-bounces@gnu.org>)
	id 1rXPS8-0007tT-BR; Tue, 06 Feb 2024 12:41:48 -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 <ams@gnu.org>) id 1rXPS6-0007tI-7v
 for emacs-devel@gnu.org; Tue, 06 Feb 2024 12:41:46 -0500
Original-Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ams@gnu.org>)
 id 1rXPS4-00019t-CK; Tue, 06 Feb 2024 12:41:44 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From:
 mime-version; bh=Z06OD+9C7k85qyV/cdwU3rmZh49uls2+ZtOpE8SY56A=; b=Ik+OfATDyFEc
 XJU0EIFjX3zbu5lpC3UkkhjxFp5wrGFWnWfG3bFOqSgwO14mDntIJzIZwb7b70+UbvWIniB/n13uT
 4NiMRO2iXK17QvByrBU8tgu20LG7vZIjBnz0oP+q1C/bAL2px/hbkOhhNsdaO2TmS5o9RMKetexjI
 JqP5Tp00XJMW5nrGHhhSsL29mWmEymJsc4QGZdwEAKJij/K2Go77VmVkh2gUlsTAe1gL71iUWVsa0
 CN1uBu5sjyQc52CgA+TSu0KF+ojhMivHka05LwzfMC647PIjFywnkjGgLaa2GqrueEcYPVolfq/qf
 6YA98LPL9cD3yFlFrmCSKQ==;
Original-Received: from ams by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <ams@gnu.org>)
 id 1rXPS4-0003ZC-3z; Tue, 06 Feb 2024 12:41:44 -0500
In-Reply-To: <SJ0PR10MB548817CF1242E8DB20D3675AF3462@SJ0PR10MB5488.namprd10.prod.outlook.com>
 (message from Drew Adams on Tue, 6 Feb 2024 17:29:07 +0000)
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-devel>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=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:315939
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/315939>

The reason why we use COND, CASE, .. ASSQ, ASSOC, ASSOC-STRING .. EQ, EQL,
=, STRING= is about _intent_, and communicating with the user.

E.g, CL-CASE is _infinitly_ easier to understand (basically COND with
implicit EQL) than a generalized "COND".  That is not to say that a
"generalized" COND, or a COND that works over "patterns" (which is not
over types!) is not useful, they like many things have their place.
But they should be used when they make _sense_.

	 (pcase escape
	   (?% (insert "%"))
	   (?h (insert host))
	   (?n (insert (or port "")))
	   (?u (insert (or user "")))
	   (?p (insert (or pass "")))
	   (?f (insert (or file "/"))))))

The change was literally case -> pcase .. that does not make sense.