From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Porter Newsgroups: gmane.emacs.devel Subject: Re: Code for cond* Date: Sun, 21 Jan 2024 14:05:24 -0600 Message-ID: <86a97153-94eb-4df4-b135-4127d2a00057@alphapapa.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1202"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: acorallo@gnu.org, emacs-devel@gnu.org, joaotavora@gmail.com To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 21 21:06:12 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 1rRe55-00006k-5R for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Jan 2024 21:06:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRe4Y-0006Ul-7K; Sun, 21 Jan 2024 15:05: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 1rRe4V-0006UZ-7p for emacs-devel@gnu.org; Sun, 21 Jan 2024 15:05:35 -0500 Original-Received: from iguana.tulip.relay.mailchannels.net ([23.83.218.253]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rRe4S-0002BS-M3; Sun, 21 Jan 2024 15:05:34 -0500 X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id D711E761F27; Sun, 21 Jan 2024 20:05:27 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a249.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 62C7C761A62; Sun, 21 Jan 2024 20:05:27 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1705867527; a=rsa-sha256; cv=none; b=NEShZaShwadFqHpFX6MV5gVos276yo+XEge3v80YfHMo5/kaIhKouXCx4In9bpJXAu8euZ t+IjWlxUbYZRbC4vD3KS/zl/nzJbF0/54swIVWQ6KAxS2q5fjUt1ZT9JM4Ra9hrE+AQ/Qv B0d4HCT0RpWB6mcXemMTOs2V8dDERABB939mWQLMGb22N/+FRV8OL0vvYM7TQN+6PovtEC vZwaQMkjmvIzifOc+mcTDwfRoTAfQEvRBWhmF2y5QC+7K3EFUrlhwobUfRoBs6ieXztb5G BPVLhalnHUeHkWIv4taWBWvVd413KPLsunjwpU6VNJuflMt1jIHn+xu6QNfRYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1705867527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Pr1laBBIQy3i/SiVe5K7nXcPHl3ORgI63hw7CsymYPk=; b=zmGZ8E2J1o/Qdko58vhcmICO/nLqLWad4VbTArrATiy2O+ihnQvcHjq/h0WCXBLlFiD5aN ov06kXCf2E6Zcku2VtLKX6RgMHcwJWjq7ATNB6Sm5EjF2BbekGrLA/Nvc3dbtkKGd60+iM dp122W89j6NEpoc58DxnXUANwTBTyEAYvINsE3sY7vJO0raLA8qE2he2E2mbWP6k9J2Yph 8P6xTdrNU9tbqSqWA0RioNqs5pg32AHiDiVXYR1fvgXbWvlxRlk45ER34FO+H2wMa7wUNW BzCLx9ukh/Xo3ZgIe+f2Y6PxYGkYxH2RFpK2aQR1aCZWPNjYDvJUPJ27MdCSLQ== ARC-Authentication-Results: i=1; rspamd-88587c4b9-x4sw9; auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@alphapapa.net X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|adam@alphapapa.net X-MailChannels-Auth-Id: dreamhost X-Print-Gusty: 2b2dce933330d88d_1705867527663_322515929 X-MC-Loop-Signature: 1705867527663:2713049309 X-MC-Ingress-Time: 1705867527663 Original-Received: from pdx1-sub0-mail-a249.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.102.134.29 (trex/6.9.2); Sun, 21 Jan 2024 20:05:27 +0000 Original-Received: from [10.66.1.82] (unknown [91.193.232.98]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: adam@alphapapa.net) by pdx1-sub0-mail-a249.dreamhost.com (Postfix) with ESMTPSA id 4TJ48k2whmzC9; Sun, 21 Jan 2024 12:05:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net; s=dreamhost; t=1705867527; bh=Pr1laBBIQy3i/SiVe5K7nXcPHl3ORgI63hw7CsymYPk=; h=Date:To:Cc:Subject:From:Content-Type:Content-Transfer-Encoding; b=VCT54WE+u0SlFYaQ/yOh53FweBIKE21/ay+6Ol720J+4NU3m18O9I6sl+S7kmbiGf +jOpv86XmBtPs2NxD+W2FvGFf6RneMImfobgphY/eHOzjbPn4K6Ay1ClUz0UaWon7y anXZ5pRAehgvI6QPU5cSKNxyw88XoT3pO+/wbj+oX2ZFiL9mfxVfWI0NUFMs/PQjCi 4loK7IrJ3VqxTfkdBS08kILfj6oWMXzXu3zE/MfJ7aa2sAEqP+srm7Vzf76HSb9a06 Pi7H9Sriul4X6zXslUN2FXzrIFMGZp/C3nqqMW1zUHHSLSsGuegbbKUMj35q1/0oa9 eP1vmLcRpt9og== Content-Language: en-US In-Reply-To: Received-SPF: neutral client-ip=23.83.218.253; envelope-from=adam@alphapapa.net; helo=iguana.tulip.relay.mailchannels.net X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 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_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779, 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:315191 Archived-At: Dear Richard, With regard to these comments you made about Pcase and cond*: > cond* has four basic advances over pcase: making bindings that cover > the rest of the body, matching patterns against various data objects > (not forcibly the same one), use of ordinary Lisp expressions as > conditions in clauses, and the abolity to make bindings and continue > with further clauses. Respectfully, I'd like to point out a few things: * "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. It can easily lead to ambiguity and cause confusion. It is not very "Lispy" (similarly to cl-loop, where the bounds of its bindings are ultimately contained at the top level, but can be introduced without explicit or obvious bounds). * "matching patterns against various data objects (not forcibly the same one)" Pcase can already do this (e.g. with its `guard' pattern). As well, it destructures objects that cond* does not, such as maps, structs, and EIEIO objects. * "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. > I'm going to do some more testing and then install cond*. Obviously, this is your prerogative. Yet, I would ask you again, respectfully, to reconsider. Your stated reasons for writing cond* were various shortcomings of Pcase. Some of those, e.g. the documentation, have already had volunteers step up to address. The others could also be addressed in various ways. I've suggested a few, but you haven't explained the reasons for rejecting them. It's often suggested that one enhance this or that library in Emacs or ELPA rather than writing a new one that's similar but different. This seems like one of those cases. Why write a cond* expression, given its relative limitations, when one might need to rewrite it as Pcase later, given Pcase's other abilities? 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*? Thanks for your work on Emacs. Sincerely, Adam Porter