From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?iso-8859-1?Q?Jo=E3o_T=E1vora?= Newsgroups: gmane.emacs.devel Subject: Re: Replace trivial pcase occurrences in the Emacs sources Date: Wed, 24 Oct 2018 11:16:00 +0100 Message-ID: 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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1540376096 28477 195.159.176.226 (24 Oct 2018 10:14:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 24 Oct 2018 10:14:56 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) Cc: michael_heerdegen@web.de, eliz@gnu.org, Stefan Monnier , emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 24 12:14:51 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 1gFGBb-0007Ds-K9 for ged-emacs-devel@m.gmane.org; Wed, 24 Oct 2018 12:14:47 +0200 Original-Received: from localhost ([::1]:47266 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFGDh-0002d1-Ok for ged-emacs-devel@m.gmane.org; Wed, 24 Oct 2018 06:16:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFGCv-0002JE-BG for emacs-devel@gnu.org; Wed, 24 Oct 2018 06:16:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFGCs-0006Bg-8T for emacs-devel@gnu.org; Wed, 24 Oct 2018 06:16:09 -0400 Original-Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:33249) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gFGCs-0006BC-1M; Wed, 24 Oct 2018 06:16:06 -0400 Original-Received: by mail-wr1-x429.google.com with SMTP id u1-v6so4953638wrn.0; Wed, 24 Oct 2018 03:16:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=g1zmYNFqovWlgmjZeffiiA/CC29TMhKoL+pVgaSqL1I=; b=Vcbd8kmqfRtdX23n6PUboLRvZTdIMyy41wkNRTUamHST0Z/CvJewaxpUW/ktJw1FUH FsAT8SfzvmbbgXSBjEBENaA1JKkwh/NpN98Rfv9KDyAbmUIIkCCC9RdpTR4MQT3BevrS ddlPwgzs3EVIoF+14HyCSq5jFX6VOoqajxFkC5lrEnjfGwp1TAk8lrheMvy6N+W9HkYk kTtLdqAJpMrnsTtXTL3GGZ9ZlPwUq1qZElj0liY/dq7UDIN12U5IiYv3J1VmE/kPb3go y+VwEgndDWRjNOanC+JTkV7nEtlqEAiidR2baspOWxUzZ2Q6n7n891K39JsEW/96fKAZ g47g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=g1zmYNFqovWlgmjZeffiiA/CC29TMhKoL+pVgaSqL1I=; b=e/2swunGOIAx9kjJyMeslyn1Ca/ZAVH+ndWf9xHBhfGsNDM5/QWcMp/hrxc2kYWatB LXid1NfXqkVoY5h7Rq7+DEvB7jqaip8H8FPkAMCRplnT5/LzIeLR1brMod2dooXKW8TX qTvyw1iF3pMs3mfigYTdIrt87iXR/7S9v0o9JZT4EWGMe6kT4rUwK1HGl7bhhYquG5bQ YtQppI+OdpRvw9rHbHuYIub6C4dsO6myVBVHsLOabwnOLzITgAY/qMALAlydJuIIfjfQ xjhaKa4xbS5nn38HnhOykj3m54zOkvdK0rqLGotoyTunVrbfJ7mmEqb4GdqJN4aqD0Au xemQ== X-Gm-Message-State: AGRZ1gKyK8S+h4a70t48qY4d3Iqi1DratY01COSiC91NLZ3OIddtctsG 1Hgjt2SRVWd/mm+Cl8qV8a2aYAco X-Google-Smtp-Source: AJdET5c24/R6zRlGnqq9LhAcOLgmIVX3bDZp7NMVPzU163wDV7NYMtF3wpjNlKPuSTHAwS1AibD0EQ== X-Received: by 2002:adf:f3d0:: with SMTP id g16-v6mr2018516wrp.227.1540376164432; Wed, 24 Oct 2018 03:16:04 -0700 (PDT) Original-Received: from GONDOMAR.yourcompany.com (mail3.siscog.pt. [195.23.29.18]) by smtp.gmail.com with ESMTPSA id o201-v6sm5162780wmg.16.2018.10.24.03.16.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Oct 2018 03:16:03 -0700 (PDT) In-Reply-To: (Richard Stallman's message of "Wed, 24 Oct 2018 00:51:35 -0400") X-Antivirus: AVG (VPS 181024-0, 24-10-2018), Outbound message X-Antivirus-Status: Clean X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::429 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:230621 Archived-At: Richard Stallman writes: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > > In what sense is the above cl-case more clear than the pcase equivale= nt? > > I'm not saying the pcase version is better in those cases, but I think > > the respective advantages and disadvantages pretty much balance out. > > I also wonder. Is it simply that people find pcase unfamiliar? My two cents: I like to write it, I don't like to read it. I like to write it because it's fun. I write some dummy '(1 2 (3 4 5) 6 7) into my code and then semi-randomly hammer out parenthesis, backquotes, commas and underscores until it does what I want. In the end I'm happy for winning this little game, and happily convinced it saved me a ton of LOC (which it probably did). When reading it, I shudder a little. The backquote syntax helps in warning that something potentially difficult is in front of me, so please don't remove it. I can't explain, but I don't feel this way about destructuring-bind (or its destructuring-case variants [0]): they're boring to write and easy to read. Jo=E3o [0]: http://www.crategus.com/books/alexandria/pages/alexandria.0.dev_fun_destruc= turing-case.html