From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: The poor state of documentation of pcase like things. Date: Sat, 02 Jan 2016 09:35:49 +0100 Message-ID: <87r3i0l6oq.fsf@fencepost.gnu.org> References: <20151216202605.GA3752@acm.fritz.box> <87io3m60bq.fsf@web.de> <877fk1nnk0.fsf@web.de> <8760zlue3j.fsf@gmail.com> <87vb7kajgv.fsf@web.de> <83y4c9ag06.fsf@gnu.org> <87bn95m9eg.fsf@fencepost.gnu.org> <5686CDFB.2010105@dancol.org> <83fuygcs5g.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1451723784 9686 80.91.229.3 (2 Jan 2016 08:36:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Jan 2016 08:36:24 +0000 (UTC) Cc: michael_heerdegen@web.de, Daniel Colascione , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 02 09:36:18 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aFHfd-0004IZ-Ln for ged-emacs-devel@m.gmane.org; Sat, 02 Jan 2016 09:36:17 +0100 Original-Received: from localhost ([::1]:37756 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFHfc-0007Hb-NE for ged-emacs-devel@m.gmane.org; Sat, 02 Jan 2016 03:36:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFHfZ-0007HS-Hn for emacs-devel@gnu.org; Sat, 02 Jan 2016 03:36:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aFHfY-0004Cb-MO for emacs-devel@gnu.org; Sat, 02 Jan 2016 03:36:13 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49064) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFHfQ-00048n-VF; Sat, 02 Jan 2016 03:36:04 -0500 Original-Received: from localhost ([127.0.0.1]:45491 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1aFHfP-0006nW-Oo; Sat, 02 Jan 2016 03:36:04 -0500 Original-Received: by lola (Postfix, from userid 1000) id 2C27AE03D4; Sat, 2 Jan 2016 09:35:49 +0100 (CET) In-Reply-To: <83fuygcs5g.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 02 Jan 2016 10:16:59 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) 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.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:197348 Archived-At: Eli Zaretskii writes: >> From: Daniel Colascione >> Date: Fri, 1 Jan 2016 11:05:31 -0800 >> Cc: Michael Heerdegen , emacs-devel@gnu.org [pcase stuff] >> > One could probably do >> >=20 >> > (and skip >> > (or (eql skip 0) >> > (setq ...))) >> >=20 >> > I'm not fond of eq for numeric comparisons: that's an Elispism. >>=20 >> That's true, but I think it's too pervasive to change now, so why >> fight it? > > Who said anything about fighting? I just asked if there was anything > there that I was missing. I am pretty sure Daniel was referring to my eq/eql side remark. I=A0certainly hope that "pervasive" is not a proper characterization of pcase use yet though I haven't checked. > Now that I know there isn't, I can convert such code to using 'cond' > whenever I feel like it. Like we do with whitespace changes. Some of the quoted pcase examples indeed felt like the "if your preferred tool is a hammer, every problem looks like a nail" phenomenon. There certainly is a case for liberal use of complex complexity-taming constructs (for example, overall I can appreciate how cl-loop straightens out a lot of awkward loop constructs even though its syntax is not really Elisp-like). But when a simple construct is a perfect fit, it's not helping understanding. --=20 David Kastrup