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" Newsgroups: gmane.emacs.devel Subject: Re: [External] : Re: cond* vs pcase Date: Tue, 06 Feb 2024 12:41:44 -0500 Message-ID: References: <87il32iwmm.fsf@posteo.net> <87o7cttu4l.fsf@posteo.net> 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 Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 06 18:42:34 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 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 ) 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 ) 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 ) 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 ) id 1rXPS4-0003ZC-3z; Tue, 06 Feb 2024 12:41:44 -0500 In-Reply-To: (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." 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:315939 Archived-At: 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.