From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Instead of pcase Date: Fri, 01 Dec 2023 16:44:22 +0200 Message-ID: <83il5i9e49.fsf@gnu.org> References: <87fs169mjj.fsf@posteo.net> <093f11a1-57c2-5e56-d39b-26fef1c67cbb@gutov.dev> <25942.25061.217864.329049@retriever.mtv.corp.google.com> <87zfzdcz6z.fsf@posteo.net> <763f067b-4ca9-1eba-9f3c-424c38589e9c@gutov.dev> <83fs0navpj.fsf@gnu.org> <838r6ebfhw.fsf@gnu.org> <83msuu9m2y.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="648"; mail-complaints-to="usenet@ciao.gmane.io" Cc: joaotavora@gmail.com, owinebar@gmail.com, rms@gnu.org, philipk@posteo.net, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 01 15:45:41 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 1r94lw-000AWF-UF for ged-emacs-devel@m.gmane-mx.org; Fri, 01 Dec 2023 15:45:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r94lQ-0007tj-W3; Fri, 01 Dec 2023 09:45:10 -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 1r94lE-0007rW-CK for emacs-devel@gnu.org; Fri, 01 Dec 2023 09:44:58 -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 1r94lD-0007hW-Bk; Fri, 01 Dec 2023 09:44:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=kJCOAD0KVjvUOVDXCGxlkNkDdJR24WGbvvc5cq7OW3A=; b=HZRnQnL2rIdJ BbsI8nuePALT5IFBdJvWCcRMIYiw6USjBU10EV54wgyZTNUtjlcT33fQrgQD7BvSSY3kmsMrqXbFQ W3tZ8PYpCgycVu9a32vM6WFRGlzm6YFU72RpBMFjitjJRYyibTWgp6QKgS+q7s5hKMP6yJqHKM+2K mWJunHpq1HS9u2nUZ4Fo3a1fe4N9JSZ4DQGJrZRxS0FV/1piYYH8Gq0KLpk1NvcD9/fzelx+iwWRt ETdG9Bl4TAd87Cqs1IfP/rx8AncqBWrxLoVp+HxploVoFgOiv3bKhyeznmt/daOhY86OXvQ57B5ds cNWDxJbG3wx//KWlq9NvWg==; In-Reply-To: (message from Dmitry Gutov on Fri, 1 Dec 2023 14:48:22 +0200) 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:313441 Archived-At: > Date: Fri, 1 Dec 2023 14:48:22 +0200 > Cc: owinebar@gmail.com, rms@gnu.org, philipk@posteo.net, emacs-devel@gnu.org > From: Dmitry Gutov > > On 01/12/2023 13:52, Eli Zaretskii wrote: > > If this is that easy, then why do we need no less than 120 lines to > > describe pcase in the doc string, and no less than 600 lines to > > document its features in the ELisp manual? > > Most of those describe the extensions, or additional features, which are > not essential to understanding the basics, to understand the examples > which we were looking at in this thread. This doesn't match the reality. The node "pcase Macro" holds over 400 lines. The first 145 lines describe the various feature of pcase itself. The rest are examples and caveats, but the very fact that we decided to have them there means that pcase is not easy to understand. The node "Extending pcase" is indeed about extensions, which is why I didn't include its line count in the number above. The node "Backquote Patterns" is actually part of the pcase description in the "pcase Macro" node, and was moved to a separate node for methodological and didactic reasons; it holds more than 100 lines. The node "Destructuring with pcase Patterns" describes an important part of pcase functionality. At least the first 45 lines of it are about pcase, even if you consider pcase-let etc. as "extensions". So, even if you want to exclude "extensions and additional features", the description takes 145+100+45=290 lines, or 400+100+45=545 if you agree that all of the first node is documentation, not "extensions". That's quite a lot, and we have all that for a reason: you may remember the disputes and several significant edits that this section went through, because the original, much shorter text was deemed insufficient. > > All I'm trying to say is that > > there_are_ inherent problems in the DSL whose knowledge is required > > to understand code written using pcase, and that you and others should > > recognize these inherent problems are real, even though you have > > overcome them, and anyone could overcome them given enough time and > > experience. > > Most of us can agree that these DLS have associated costs. Then we agree. I just attempted to broaden this agreement. > Whether they are "problems" (to be fixed?), meaning the costs outweigh > the benefits, seems to be the main theme of this thread. You read too much into the words. "Problems" are not necessarily something that must be fixed, and "costs" is not necessarily something that need not be fixed. Those are basically synonyms in this discussion.