From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Regexp bytecode disassembler Date: Sun, 22 Mar 2020 19:30:36 +0200 Message-ID: <838sjscn5v.fsf@gnu.org> References: <4201DF24-BCC4-4C08-9857-38207B7C10B4@acm.org> <83mu8bdriv.fsf@gnu.org> <68FB4EC3-3C67-4D07-8473-5FC671024515@acm.org> <834kuhecsr.fsf@gnu.org> <875zex79bx.fsf@gmail.com> <83y2rtcux2.fsf@gnu.org> <871rpl77zy.fsf@gmail.com> <83r1xkcwbk.fsf@gnu.org> <87sgi05u2w.fsf@gmail.com> <83imiwcorq.fsf@gnu.org> <878sjs5myd.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="90495"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mattiase@acm.org, emacs-devel@gnu.org To: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 22 18:31:37 2020 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 1jG4Rk-000NSI-Qt for ged-emacs-devel@m.gmane-mx.org; Sun, 22 Mar 2020 18:31:36 +0100 Original-Received: from localhost ([::1]:48488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jG4Rj-0003G9-SV for ged-emacs-devel@m.gmane-mx.org; Sun, 22 Mar 2020 13:31:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52044) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jG4Qp-0002VS-T8 for emacs-devel@gnu.org; Sun, 22 Mar 2020 13:30:40 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37478) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jG4Qp-0007cG-KB; Sun, 22 Mar 2020 13:30:39 -0400 Original-Received: from [176.228.60.248] (port=3489 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jG4Qn-0002Nq-9S; Sun, 22 Mar 2020 13:30:39 -0400 In-Reply-To: <878sjs5myd.fsf@gmail.com> (message from =?utf-8?B?xaB0xJtw?= =?utf-8?B?w6FuIE7Em21lYw==?= on Sun, 22 Mar 2020 18:16:58 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:245684 Archived-At: > From: Štěpán Němec > Cc: mattiase@acm.org, emacs-devel@gnu.org > Date: Sun, 22 Mar 2020 18:16:58 +0100 > > > I disagree. And please also consider the easiness (or lack thereof) > > of changing the code, not just reading it. pcase is far from being > > simple, its syntax is tricky to understand fully. it's no accident > > that it took us 2-3 iterations and many discussions to converge on > > what is now its documentation. Just the volume of that documentation > > should tell you how NOT transparent is its complexity. > > Changing code that _uses_ pcase doesn't involve changing code that > implements pcase, unless I'm missing something. It depends on the change. And in any case, how can you reliably change code whose syntax you don't sufficiently understand? > Given that using pcase here makes the code in question shorter (and for > most of those who commented apparently also more readable) compared to > the cond version, doesn't that _add_ to the easiness of changing it? For you and me, maybe. But we must think of others. I'm not saying we shouldn't use pcase -- we use it quite a lot in pur sources. I'm saying that using it where simpler, more basic constructs will do reasonably well is more economical. > > So you are saying that reading code should be accompanied by expanding > > the macros it uses? > > Certainly not. I already said that I believe the code was perfectly > understandable even for people knowing nothing about pcase (at least in > this case). How can we, who master this already, know what is or isn't understandable for people who don't? I don't think we can. You cannot "unlearn" something, at least not easily. The only practical strategy is not to use devices that are overkill.