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: combining cond and let, to replace pcase. Date: Sun, 19 Nov 2023 16:49:28 +0200 Message-ID: <83pm05kdc7.fsf@gnu.org> References: <878r6u3s7f.fsf@web.de> <831qcmklys.fsf@gnu.org> <87v89x3o19.fsf@web.de> <83v89xki0p.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21201"; mail-complaints-to="usenet@ciao.gmane.io" Cc: michael_heerdegen@web.de, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 19 15:50:08 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 1r4j7g-0005Kd-5P for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Nov 2023 15:50:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r4j7L-0000KS-RB; Sun, 19 Nov 2023 09:49:47 -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 1r4j7K-0000KK-9h for emacs-devel@gnu.org; Sun, 19 Nov 2023 09:49:46 -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 1r4j7K-0007Ub-0P; Sun, 19 Nov 2023 09:49:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=WnVnEcWhqDUu78dFQXDQa8b9sAzE+hpMmeIyDvHXqIc=; b=KiCX7k9qhzm2/KLDlw+Y 72BCcNYwonbwDLCUvns6HLVuUzbvGXw4aaDpxrNXeSw8RutS8bwXTzN8mVtJ78fORzmPC441qwt2v mualMZzWnI9QemygcXFRTaMMplffyZJODlqaVOrQHuXouqnnzZsGvAlFv0QnytEmIOBtAkcG2GMhs 8hmCwW5FBEMdtEt8CqDkeqpWqfPJ0l+T7Va06GZFvHKsFFjoLxID49Sz2td+CD2ocSD/OPBU9QXIR 8ztT1Ta/xCbYlaGyAJvBOzjX8KKOPQ3yDlPgopV0NXA6K3alDuV9ISSZ6Q3kvbtTm1xJIwSDEayil H9Lftt3avFfWWw==; In-Reply-To: (message from Dmitry Gutov on Sun, 19 Nov 2023 15:59:46 +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:312988 Archived-At: > 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.