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: Mon, 4 Dec 2023 14:37:11 +0200 Message-ID: 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> <83zfyu9wdg.fsf@gnu.org> <87edg69tup.fsf@linux-m68k.org> <83zfyq5gds.fsf@gnu.org> 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="9499"; 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: schwab@linux-m68k.org, emacs-devel@gnu.org To: Eli Zaretskii , rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 04 13:37:47 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 1rA8Cn-0002EX-CJ for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Dec 2023 13:37:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rA8Ca-000620-3J; Mon, 04 Dec 2023 07:37:32 -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 1rA8CS-0005xL-5Y for emacs-devel@gnu.org; Mon, 04 Dec 2023 07:37:24 -0500 Original-Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rA8CO-0006fx-0q; Mon, 04 Dec 2023 07:37:22 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 242833200A58; Mon, 4 Dec 2023 07:37:17 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 04 Dec 2023 07:37:17 -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= 1701693436; x=1701779836; bh=l+Od1sjZ8Cd9MEXZ9833HbSYS9SlknCSNfP oUBVy13U=; b=TGrpgcklZ8fToLdX4dP5mh4dH+lazyc6R7maT1yT4CZLtC3+yGh /4LSigREdhyN5/GaqEnVh8CA3jlh5zvahJS61dM7GPC/+Pec6N1w8LneqKMxeEPS y70cR1Ay62RVPgurK2C7c5jCq5hBeqFb4jSNsrjhjKLDTmK9V6zEQ78QE3h84U6X smN8ClC4wsfYs+HcUGVE6m6p/wzpcwGosrXyYYp+sQD0kQGfCvQvFctf+h15zSk9 lCzEhryQ8Kfn1CM22GYGxQWVJ8o9cB8DFtgCaw0oHMUyZGL5JrtWgYeeSNqIJztF vtyrLjpKn4fKpwTswN1+RMYBZ8zK+9E7PvA== 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= 1701693436; x=1701779836; bh=l+Od1sjZ8Cd9MEXZ9833HbSYS9SlknCSNfP oUBVy13U=; b=2/jwZ/RlfPg6IQkF73O3W/IS5O4sbmjZ11H1r/L/fZfcLGeKvz3 1nQpsxGaEC2kWrIkJVvz6WHYpA8MQXc8fl8uFO4WG19IO9TqD7wL0S+Oe5hIAASI k/AEhSq7CTADBj+1zMa8X+RZdD/y1jixYqh0HXkHSxmeV3dJKaofPU/GUMHWVB3k HYREPrDqprfTXZ07rbOkLiwiw2m9+ghSmzB8SeTzzhCverq2zI/xdI/iDv+oYjcG rW/hYJ30p0a/5yOH3mk21MCRXBtiVxuMhSERizDns9mIIM7O6NnIja0kJifo6U8g Fn+MOnxr7NrX1mkroHoI1GlomGo2ArwMWiw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudejiedggeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 4 Dec 2023 07:37:14 -0500 (EST) Content-Language: en-US In-Reply-To: <83zfyq5gds.fsf@gnu.org> Received-SPF: pass client-ip=64.147.123.19; envelope-from=dmitry@gutov.dev; helo=wout3-smtp.messagingengine.com X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 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=-4.096, 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:313518 Archived-At: On 04/12/2023 13:58, Eli Zaretskii wrote: >> From: Richard Stallman >> Cc:emacs-devel@gnu.org >> Date: Sun, 03 Dec 2023 22:08:21 -0500 >> >> > This is not true. There is no magic at all in the use of this reader >> > feature which is totally lost after reading. It is absolutely >> > impossible to detect its use afterwards. >> >> As a factual matter about dotted pairs in pcase patterns, that is >> correct. >> >> However, we have repeatedly seen that experienced Lispers, who would >> have no trouble understanding those constructs in a backquote meant to >> actually construct a structure of conses, don't know what to make of >> them on encountering them in pcase patterns. >> >> That's another factual matter about dotted pairs in pcase patterns. >> It is more a psychological matter than a computational matter, but >> that doesn't invalidate the observation. >> >> It is part of the impact of complexity of pcase. > Some people are saying that everything is clear because the Lisp > reader does this and that. But when humans read code, they don't > normally run the Lisp reader in their head, they use other techniques > to read and grasp what the code does. If there's a need to ask what > does the Lisp reader do with some syntax, that is already an obstacle > to understanding the code, even though eventually one can understand > it, whether by thinking what the reader does or by actually running > the reader and/or macro-expansion. Note that this subthread is not about pcase but about a particular instance where it was used together with the dotted syntax. In other places, people would use the dotted reader syntax inside a backquote without pcase, and the above considerations would stil apply. Finally, in the example that was brought up, the dot syntax really *was* used to make comprehension more easy. But to see that you have to actually read the surrounding code and try to understand the data flow. And if the dotted syntax were not used, the spectator *would* have to conjure up the knowledge that (a . (b c)) is the same as (a b c). Whereas the current solution avoids that need.