From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: The poor state of documentation of pcase like things. Date: Sat, 2 Jan 2016 22:11:55 -0500 Message-ID: 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> <99364c8d-ba83-4e10-8345-5bd8dc926e7d@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1451790733 28654 80.91.229.3 (3 Jan 2016 03:12:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Jan 2016 03:12:13 +0000 (UTC) Cc: dak@gnu.org, michael_heerdegen@web.de, emacs-devel@gnu.org, Dmitry Gutov , Lars Magne Ingebrigtsen , Daniel Colascione , Eli Zaretskii To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 03 04:12:04 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 1aFZ5P-0000q6-Nb for ged-emacs-devel@m.gmane.org; Sun, 03 Jan 2016 04:12:03 +0100 Original-Received: from localhost ([::1]:40352 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFZ5O-0003PE-TG for ged-emacs-devel@m.gmane.org; Sat, 02 Jan 2016 22:12:02 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFZ5L-0003P9-KF for emacs-devel@gnu.org; Sat, 02 Jan 2016 22:12:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aFZ5K-0002f3-Nr for emacs-devel@gnu.org; Sat, 02 Jan 2016 22:11:59 -0500 Original-Received: from mail-ig0-x22c.google.com ([2607:f8b0:4001:c05::22c]:38815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFZ5I-0002eS-3u; Sat, 02 Jan 2016 22:11:56 -0500 Original-Received: by mail-ig0-x22c.google.com with SMTP id mw1so88667544igb.1; Sat, 02 Jan 2016 19:11:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=2IQSB2OefkVLdDRxxxOfx2cIZLC+a//nD3H2kF6sTm0=; b=c1c0BfSzSQ4nUlzRHDFEZa9kyEDD+/7zxOMSOkJQIuXLtYLDFXkz3wnKbD7JCzLaOC eHUC8+GXpV3nQhoZAni+miVY4m3EZAvNaCsLtgJTwsYLjO8JZaxXVTZaJ4mxFa0xYyBF vN7/Fl/k51wjkyFmGOLum900rbdxWeN53EljJNCp8CF1BusMQBapcjm8OZh7R4UYai70 XU6SMR5vgpllTPYFb3QGbZ3Y6vgXxCVPnExtoJnXewq26sJewQNF94Z1+d+kqPHl1Npg +nRLeJoLb6srWLZCHG61P7T+8Rj7JgWVLSyW2kE3riABIyzpw8xdZaqMoLD1e8ATzAyv rd+w== X-Received: by 10.50.155.72 with SMTP id vu8mr48678029igb.35.1451790715499; Sat, 02 Jan 2016 19:11:55 -0800 (PST) Original-Received: by 10.79.29.73 with HTTP; Sat, 2 Jan 2016 19:11:55 -0800 (PST) In-Reply-To: <99364c8d-ba83-4e10-8345-5bd8dc926e7d@default> X-Google-Sender-Auth: YnGkUMRIfcpd7U5rybTwdBAk1cE X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4001:c05::22c 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:197402 Archived-At: On Sat, Jan 2, 2016 at 9:48 PM, Drew Adams wrote: >> Well, I'd say that pcase is kinda awkward because you can't tell by >> skimming whether it's complex or not > > 100% agreement. That's really the point, for me. > > * `pcase' shouts: "This might be complicated. Better look closely." > > * `cond' and `cl-case' and `if' ... shout: "Nothing fancy here. > We're only testing literals" I don't see how `cond' and `if' shout that at all, they can test anything, no restrictions. I would prefer `pcase` over `cond` (if there were some reason to exclude `cl-case') because the code is shorter and simpler so I can skim it faster than the equivalent `cond'.