From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Instead of pcase Date: Fri, 1 Dec 2023 20:28:43 +0200 Message-ID: <241fce6d-fbb6-aa7c-b0b5-5a654eec023d@gutov.dev> 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> <83il5i9e49.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18425"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: joaotavora@gmail.com, owinebar@gmail.com, rms@gnu.org, philipk@posteo.net, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 01 19:29:52 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 1r98Gt-0004Yi-Ib for ged-emacs-devel@m.gmane-mx.org; Fri, 01 Dec 2023 19:29:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r98Fx-0003cG-Rt; Fri, 01 Dec 2023 13:28:53 -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 1r98Fw-0003bp-4M for emacs-devel@gnu.org; Fri, 01 Dec 2023 13:28:52 -0500 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r98Fu-0001PY-0p; Fri, 01 Dec 2023 13:28:51 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 8F6EE5C0159; Fri, 1 Dec 2023 13:28:48 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 01 Dec 2023 13:28:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1701455328; x=1701541728; bh=PctHzeuGkcD6sGxnu1JyGab3/lUqSDJgZzr sUpYvJKE=; b=ux455Mq3cbtrVSzs6UTwcanyarAb8NKYb54RiqiikEEKtTfQmdK Lt/C28gYYDg9kqTbuoBWtmVGa5OR5fa3+G+H0Qi23C//eHbprB7qSdxHRGokobOj DsjzQq24jTNRo4bKXQhdNWu8aO25xg6mXshuK1E6koAP2vGjp2ggRy/m9u2p3zqm 8BLVXO07nQKWAnOF6RmZFIWZMCYBHwpDV/MD8bromPuDzHdu/2S/ajyWJ2j+pMjK FJWwThAhnFwQbmcDsVFt+z0vw1p2eLYTXaGOgS3fEEn8X0mDmSkkW0/Gus0L6xtp XPayyKbA6MPOghUrojN3sDUzYkEFpOFCAog== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1701455328; x=1701541728; bh=PctHzeuGkcD6sGxnu1JyGab3/lUqSDJgZzr sUpYvJKE=; b=o5aGqAWiMM7HIBzZ4DI5WXbdZASpl/slvWgLOSIZkb2JHu/2+gL mRkzaJM0j/0eSeOwkhlXfGRE9XZtXGQNLp0DucKegK6eJzn/WI+H2YASNq1IYY6w Jc06d0xrVsxouxlFt5m42nLDS5FziySASDot0t9zfuRuXRBh+UVuTerYoJjT8StH fBIMhhXsfRbBoXmhGSg0RpDl1t/VPehGpTGI2151vHJBw9Ar0dnH2m3o5Ic2m3qj VJ/9G/jQ6WBeDKBcSmcZ8uc/tA47y/RbtrQKSsQ+cPxKYRs4Oa4bwnt+iCSFbNVR mi3XdcoDCA4KiQ2AfYKgwudo6DFCOAq6HPA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeiledguddufecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpefhffehleejffegffeugefhkeektdffgfehjedvgeejtedtudehueffgffg feejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 1 Dec 2023 13:28:46 -0500 (EST) Content-Language: en-US In-Reply-To: <83il5i9e49.fsf@gnu.org> Received-SPF: pass client-ip=66.111.4.27; envelope-from=dmitry@gutov.dev; helo=out3-smtp.messagingengine.com X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.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, NICE_REPLY_A=-1.534, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, 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:313449 Archived-At: On 01/12/2023 16:44, Eli Zaretskii wrote: >> 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". That just reaffirms my understanding that the main problem with 'pcase' that we have is documentation. The nodes are written very bottom-up, whereas what's really needed for someone to understand the core usage, would look more like the first half of the node "Destructuring with ‘pcase’ Patterns". > 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. Looks like it's still insufficient. Jim Porter's suggestions for improving the docs are in a separate thread ("Improving 'pcase' documentation"), it really deserves more attention. >>> 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. Hopefully this clarification can bring most of the argument to a close.