From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.tangents Subject: Re: The poor state of documentation of pcase like things. Date: Sun, 03 Jan 2016 10:02:04 +0100 Message-ID: <877fjrkpdf.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> <56886E32.70305@yandex.ru> <83si2f9ve4.fsf@gnu.org> <56889EC3.3040108@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1451833937 22899 80.91.229.3 (3 Jan 2016 15:12:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Jan 2016 15:12:17 +0000 (UTC) Cc: michael_heerdegen@web.de, Eli Zaretskii , dancol@dancol.org, emacs-tangents@gnu.org To: Dmitry Gutov Original-X-From: emacs-tangents-bounces+get-emacs-tangents=m.gmane.org@gnu.org Sun Jan 03 16:12:16 2016 Return-path: Envelope-to: get-emacs-tangents@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 1aFkKN-0005JA-RH for get-emacs-tangents@m.gmane.org; Sun, 03 Jan 2016 16:12:15 +0100 Original-Received: from localhost ([::1]:41865 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFkKN-0001aN-3N for get-emacs-tangents@m.gmane.org; Sun, 03 Jan 2016 10:12:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFfjm-0006Mc-Uf for emacs-tangents@gnu.org; Sun, 03 Jan 2016 05:18:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aFfjm-0000Og-3i for emacs-tangents@gnu.org; Sun, 03 Jan 2016 05:18:10 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFfjf-0000MY-6Z; Sun, 03 Jan 2016 05:18:03 -0500 Original-Received: from localhost ([127.0.0.1]:34423 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1aFfjY-0003Vr-Ai; Sun, 03 Jan 2016 05:17:56 -0500 Original-Received: by lola (Postfix, from userid 1000) id A01F0DF8BD; Sun, 3 Jan 2016 10:02:04 +0100 (CET) In-Reply-To: <56889EC3.3040108@yandex.ru> (Dmitry Gutov's message of "Sun, 3 Jan 2016 06:08:35 +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-Mailman-Approved-At: Sun, 03 Jan 2016 10:12:11 -0500 X-BeenThere: emacs-tangents@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-tangents-bounces+get-emacs-tangents=m.gmane.org@gnu.org Original-Sender: emacs-tangents-bounces+get-emacs-tangents=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.tangents:65 Archived-At: Dmitry Gutov writes: > On 01/03/2016 05:47 AM, Eli Zaretskii wrote: > >> The syntax of 'when' is nowhere as complex as that of 'pcase'. > > Obviously. > > But the given example uses a simple, small subset of pcase syntax. If > you don't want to use even that, it seems to indicate that you're > going to avoid the more complex uses of it even more so. Uh what? Whether pcase does not help with simple cases should have little bearing on whether it helps with more complex cases. > And thus, never use pcase at all. If it does not help with simple cases, and it does not help with complex cases, yes, that would be the obvious best choice. I don't think that this the argument you intend to make. > Which doesn't seem like a good choice, from my perspective. You are arguing as if we were paid for its use, not as if it had inherent value. Let it make its own case where it actually brings something to the table. We don't replace trivial cases of `if` with `cond`, `while` with `cl-loop` and so on. If we used constructs for the sake of using constructs, the code base would show a lot more use of `cl-do` (which offers little savings in return for its unreadability). Let it speak for itself where it makes sense instead of everywhere. -- David Kastrup