From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: Instead of pcase Date: Mon, 20 Nov 2023 15:52:31 +0100 Message-ID: <87zfz8cw9c.fsf@web.de> References: <87fs15kkk1.fsf@yahoo.com> <874jhi3qx3.fsf@web.de> <83y1etkiuq.fsf@gnu.org> <87jzqd3k4d.fsf@web.de> <83msv9kce2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19697"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: emacs-devel@gnu.org Cancel-Lock: sha1:lEeM8PcsAoS5neyxcpfPY2JSbk4= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 20 15:52:49 2023 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 1r55do-0004tb-KL for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Nov 2023 15:52:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r55de-0005JW-D3; Mon, 20 Nov 2023 09:52: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 1r55dZ-0004z2-8H for emacs-devel@gnu.org; Mon, 20 Nov 2023 09:52:33 -0500 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r55dW-0000hm-Jf for emacs-devel@gnu.org; Mon, 20 Nov 2023 09:52:32 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1r55dT-0004HU-O3 for emacs-devel@gnu.org; Mon, 20 Nov 2023 15:52:27 +0100 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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:313052 Archived-At: Eli Zaretskii writes: > > I'm curious how an alternative could look like, actually. > > I don't know. So I withdraw my judgment until such an alternative is > presented. I suggest that everyone do the same. > > > It would have to implement the same set of features, so it would be > > quite as complex as `pcase'. > > Complexity doesn't necessarily mean cryptic syntax. Cf regexp strings > vs Rx. If you meant to imply that pcase has a unnecessarily "cryptic syntax", this is a judgment. If you wish that the syntax should be more like human language, or more verbose, or less like a new mini-language, this is an opinion. Which is ok. But not as neutral as your first sentence suggests. Still fine by me. But when this is a opinion, and other people differ, we also should speak about the disadvantages of a different approach. For example, if we replace the backquote syntax with something that looks more like function calls, it would be less obvious at which depth and which position a subpattern is matched. Since pcase has been introduced to make specification of complex, nested patterns easier and more compact to read, we will lose this advantage. The syntax might be easier to learn, but code will be harder to maintain and tweak. At least for me. But I repeat myself. I guess it's clear to you what I want to say, so you don't need to waste your time to reply, unless you disagree or like to do so nonetheless of course. Michael.