From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Replace trivial pcase occurrences in the Emacs sources Date: Wed, 24 Oct 2018 19:00:25 +0300 Message-ID: <83bm7js5ba.fsf@gnu.org> References: <20151216202605.GA3752@acm.fritz.box> <83si2f9ve4.fsf@gnu.org> <56889EC3.3040108@yandex.ru> <877fjrkpdf.fsf@fencepost.gnu.org> <56892334.4000106@yandex.ru> <8760zakb7q.fsf@fencepost.gnu.org> <56892BDA.6060103@dancol.org> <871t9yk98g.fsf@fencepost.gnu.org> <568936F0.3060505@yandex.ru> <87wprqitj5.fsf@fencepost.gnu.org> <56893C8C.3060200@yandex.ru> <87oad2irtd.fsf@fencepost.gnu.org> <5689456A.1010601@yandex.ru> <87egdy8tyz.fsf@fencepost.gnu.org> <56895FDE.4060406@yandex.ru> <8760za8r4a.fsf@fencepost.gnu.org> <87h9iunkcg.fsf@web.de> <87h8hc4xw2.fsf_-_@web.de> <83tvlcsnee.fsf@gnu.org> <87pnw037ar.fsf@web.de> <83ftwvs7y9.fsf@gnu.org> <1249c6c5-6ff6-8b1e-102f-0b1b0942a42e@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1540396910 10187 195.159.176.226 (24 Oct 2018 16:01:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 24 Oct 2018 16:01:50 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 24 18:01:46 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFLbO-0002Yh-4E for ged-emacs-devel@m.gmane.org; Wed, 24 Oct 2018 18:01:46 +0200 Original-Received: from localhost ([::1]:49283 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFLdU-0002rL-Gp for ged-emacs-devel@m.gmane.org; Wed, 24 Oct 2018 12:03:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFLaE-00084n-9j for emacs-devel@gnu.org; Wed, 24 Oct 2018 12:00:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFLa9-0007Zj-9t for emacs-devel@gnu.org; Wed, 24 Oct 2018 12:00:34 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49523) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFLa9-0007Zb-4w; Wed, 24 Oct 2018 12:00:29 -0400 Original-Received: from [176.228.60.248] (port=4785 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gFLa8-0003PU-9x; Wed, 24 Oct 2018 12:00:29 -0400 In-reply-to: <1249c6c5-6ff6-8b1e-102f-0b1b0942a42e@gmail.com> (message from =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel on Wed, 24 Oct 2018 11:47:03 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:230635 Archived-At: > From: Clément Pit-Claudel > Date: Wed, 24 Oct 2018 11:47:03 -0400 > > On 24/10/2018 11.03, Eli Zaretskii wrote: > > Is it because people are too lazy to write (eq a b) as part of 'cond'? > > Or is there something else I'm missing? > I think some of us (me, at least), just like the forms you posted better :) Which forms? with or without the mistakes? ;-) > The repetition of "eq" in each "cond" branch just looks redundant to me If that's what bugs you, then how about (setq foo (assoc bar '((1 . one) (2 . two) ...))) ? > and I have no trouble reading the pcase forms. Please don't forget those who will read your code. A code is written once, but read many times. It should be readable and self-explanatory.