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: combining cond and let, to replace pcase. Date: Sun, 19 Nov 2023 16:53:01 +0200 Message-ID: References: <878r6u3s7f.fsf@web.de> <831qcmklys.fsf@gnu.org> <87v89x3o19.fsf@web.de> <83v89xki0p.fsf@gnu.org> <83pm05kdc7.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="36986"; 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: michael_heerdegen@web.de, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 19 15:53:27 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 1r4jAr-0009Lr-Q1 for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Nov 2023 15:53:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r4jAj-0001Qr-1H; Sun, 19 Nov 2023 09:53:17 -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 1r4jAb-0001OR-1Z for emacs-devel@gnu.org; Sun, 19 Nov 2023 09:53:10 -0500 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r4jAY-0001bx-S0; Sun, 19 Nov 2023 09:53:08 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 5D4B05C022D; Sun, 19 Nov 2023 09:53:04 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 19 Nov 2023 09:53:04 -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=fm2; t= 1700405584; x=1700491984; bh=GEWAWBTYrhLUWv3O4/Hd9wzkYQdG4GYiLeP ON2diIAQ=; b=QhdbHpZ/ZEW1yg7nCjwZVHSmAJEqKECkFJYabU7vHy/ulk8O5EX EktJkMjklIFXc9Q/toS6Jlvykng6/wHHDoN42IsH22ahgx+eXWC2ml3+a3LtZxPq UbSMffAI1mGFGI1XQFMyvCA//qoFqKeLWR+P5WMhz6pbL5YQcPGTMWuAoLy5FhI7 iH6D+uAOn2lEWONTpyEaj4XuNfQy/X10gITbLVBGSHVhbla24CAqhwPe7iHAyGIu pkP9J+RUiSSCo3N2fkHhVdB6QJ3EGQCRQACHjtnqgGpeK3sccM8reIpduxj76Ccz sH/XpFnFyMm1t7KCosaKmJ156K4DwDDlFDw== 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= 1700405584; x=1700491984; bh=GEWAWBTYrhLUWv3O4/Hd9wzkYQdG4GYiLeP ON2diIAQ=; b=KKBZQqrDMbQxTg7l7xJLmI4uZogIg0LmOFdmomK3dndtXYwwf6c 2TZEBcvi5FtGe6cNpCAu1EObT4mWEPY7ccol057TkfKG0xgiShug27fnnnRV7Kbx ACew6HVFbTiMy3n+txTKzonBE/TZ2VKykiiNa0LUxmxnA/sfFujqYiGREgC+9xwY mwix7P2G3GlsZGaP/MDTGDt5H4v35C2rt+zUl8Hl8Nt9ptI6rlu7CPQi8oEnxX/Q gxtulA9WXkZ7+vExhwyZomqJJaMpqnS2mj0/JO+LiJ1jYLnv4v74NXGfGniWFtx5 Q+5XW6TJV+FELcgHsAq4PlF//GrpW620KQA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeggedgieelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhephfffheeljeffgeffueeghfekkedtfffgheejvdegjeettdduheeufffggfef jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 19 Nov 2023 09:53:03 -0500 (EST) Content-Language: en-US In-Reply-To: <83pm05kdc7.fsf@gnu.org> Received-SPF: pass client-ip=66.111.4.26; envelope-from=dmitry@gutov.dev; helo=out2-smtp.messagingengine.com X-Spam_score_int: -65 X-Spam_score: -6.6 X-Spam_bar: ------ X-Spam_report: (-6.6 / 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=-3.74, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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:312990 Archived-At: On 19/11/2023 16:49, Eli Zaretskii wrote: >> Date: Sun, 19 Nov 2023 15:59:46 +0200 >> Cc:emacs-devel@gnu.org >> From: Dmitry Gutov >> >> On 19/11/2023 15:08, Eli Zaretskii wrote: >>>> Actually both and none, this is exactly the point I raised in my other >>>> reply - both have exactly the same complexity, and it is totally >>>> subjective and only habit which one you prefer. >>> It isn't only that. It is also that the obscure and subtle nature of >>> regexp strings makes it easy to make mistakes. Just look at the sheer >>> number of regexp mistakes uncovered in our code base by Mattias >>> EngdegÄrd during the last year. It isn't an accident. >> pcase is much better guarded against programmer mistakes because in a >> lot of cases typos or misunderstandings will be highlighted by the >> byte-compiler (potentially, with flymake directly in the buffer, which I >> also recommend everyone to enable). > When we review patches, we don't normally byte-compile the changes, > nor need to run flymake on it. Usually, it's enough to read the code. > Having to use non-trivial tools (which means apply the changes, which > means use some scratch branch or something similar) is extra hurdle. > It also means patches cannot be easily reviewed if all you have is a > MUA, without a full-blown Emacs development environment. > > IOW, it means extra requirements and restrictions, so it's a > disadvantage. It raises the bar. When we don't run a patch through CI, or apply it locally, we can just as well miss typos in "simple" code (and have done that on many occasions). That just puts the burden of testing code code and using flymake on the contributor (both good practices anyway).