From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Code for cond* Date: Tue, 23 Jan 2024 08:39:33 -0500 Message-ID: References: <86a97153-94eb-4df4-b135-4127d2a00057@alphapapa.net> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11020"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Adam Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 23 14:40:21 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 1rSH0m-0002ez-Mv for ged-emacs-devel@m.gmane-mx.org; Tue, 23 Jan 2024 14:40:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSH03-0003rk-MA; Tue, 23 Jan 2024 08:39:35 -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 1rSH02-0003r3-8n for emacs-devel@gnu.org; Tue, 23 Jan 2024 08:39:34 -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 1rSH01-0007Ql-MS; Tue, 23 Jan 2024 08:39:33 -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=641EMwQ42eBYQF0E/3lUuL+nZbRLCyY1VxL/gb9olY4=; b=nGIF6vmQYiFp DKkHjY0ZGtDBJqNfHdavRGLojEnqomkf36RUQSUERm0aJaVOZxhSqvRWiL5xbWwU5WkuBb8XdgJE/ YxX65Ey7ChzoIpfAWSXvCObkXelEH3DWhMR5qk3Vu5EVwhFmRSnf/uTw2P1y2LnPfH7NL0lksp5bX T1fikbplFL/IQIc0H9XXQ1RZ1FRwtsJH/UAuS6NIvg2jKmt2UwNYUnxSM8EhGk7zPWts4vI5dYKU1 EygYLxm2FeTAy0GdW9IiuocE8DMPBUWrrxEsJatUVTkNXX2XcRtb9u6O7/EqteXfvF7RAZ1YXEMtU tth+wZkn0dWD0822F/sBJg==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1rSH01-00025m-B1; Tue, 23 Jan 2024 08:39:33 -0500 In-Reply-To: <86a97153-94eb-4df4-b135-4127d2a00057@alphapapa.net> (message from Adam Porter on Sun, 21 Jan 2024 14:05:24 -0600) 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:315251 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > * "making bindings that cover the rest of the body...the ability to make > bindings and continue with further clauses" > As several here have mentioned, this is not universally perceived as an > advance. You're entitled to your opinion. I consider this an important advance, so I list it as one. > * "use of ordinary Lisp expressions as conditions in clauses" > Pcase can already do this with its `guard' pattern, which explicitly > demarcates an ordinary Lisp expression. Maybe you sare right about this one. > * "matching patterns against various data objects (not forcibly the same > one)" > Pcase can already do this (e.g. with its `guard' pattern). I don't see how `guard' does this job. Can a guard pattern destructure? As I understand it, it contains only a Lisp expression. As well, it > destructures objects that cond* does not, such as maps, structs, and > EIEIO objects. I will implement the structure pattern when I get the necessary information to do it. I would like this to get done, but I can wait for you to tell me what I need to know. > As well, it's already a complaint by some that having to learn Pcase is > a burden. How will that burden be helped by having to learn both Pcase > and cond*? By reducing the use of pcase, it will make code simpler to read. If pcase lacked features for certain specific jobs, it would be esay to fix that by adding a few features. However, the problem with pcase is that it has too many features for the job it does. cond* does the same jobs with fewer features because they work together better. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)