From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.devel Subject: Re: The poor state of documentation of pcase like things. Date: Fri, 01 Jan 2016 09:46:29 -0800 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1451670529 1555 80.91.229.3 (1 Jan 2016 17:48:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Jan 2016 17:48:49 +0000 (UTC) Cc: Michael Heerdegen , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 01 18:48:42 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 1aF3of-0004tb-Fs for ged-emacs-devel@m.gmane.org; Fri, 01 Jan 2016 18:48:41 +0100 Original-Received: from localhost ([::1]:36414 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aF3oe-0002m0-Rc for ged-emacs-devel@m.gmane.org; Fri, 01 Jan 2016 12:48:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33492) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aF3oa-0002kZ-Jy for emacs-devel@gnu.org; Fri, 01 Jan 2016 12:48:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aF3oZ-0002VX-Ni for emacs-devel@gnu.org; Fri, 01 Jan 2016 12:48:36 -0500 Original-Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]:35473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aF3oV-0002Uz-U5; Fri, 01 Jan 2016 12:48:32 -0500 Original-Received: by mail-pa0-x22a.google.com with SMTP id ho8so1315355pac.2; Fri, 01 Jan 2016 09:48:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mail-followup-to:mime-version:content-type; bh=PmUikWX19aDAGp7htuauBECGIfEaXxTLoOL1+CexYoA=; b=MRtx/hJO4MPkkYoqw4KuTupApBcNgAWypnNjc/YMlRezwi8gwtjQEgMdAM63NzBIq1 6Xo1NXRpGsvVBw/0RlZJhS/m8nU8FY3nE/AI3vUxZL5WruekmE2PTGmnS8BUJtFFSMh9 CKy78BelgRG9A9arCzEfhUnHMAsnoUSXv6/46ywDKoaI5sgleQa4Ieqm+shbHF7c2CfK 6zUINCgI3i8Wh1voiWXXIi9/NjLrulWQJPKeSH79Nhw60PTsSOjJqqDeTrLhuuLJOMyN l4AJEXWQo3GpGgQgtfbKbqEF6RC5PAsYVpdBrgL1EpwQWX8txIZF/x+GWa8gtiXWAgm1 CDMw== X-Received: by 10.66.219.38 with SMTP id pl6mr72132863pac.147.1451670510587; Fri, 01 Jan 2016 09:48:30 -0800 (PST) Original-Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id 28sm36584215pfo.43.2016.01.01.09.48.27 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 01 Jan 2016 09:48:28 -0800 (PST) X-Google-Original-From: "John Wiegley" Original-Received: by Vulcan.local (Postfix, from userid 501) id 29B5111F8D71A; Fri, 1 Jan 2016 09:48:27 -0800 (PST) In-Reply-To: <83y4c9ag06.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 01 Jan 2016 09:57:45 +0200") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) Mail-Followup-To: Eli Zaretskii , Michael Heerdegen , emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c03::22a 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:197311 Archived-At: >>>>> Eli Zaretskii writes: > (pcase skip > (`nil nil) > (`0 t) > (_ (setq i (+ i skip -1)) (funcall get-next-frame))))))) (cond ((null skip)) ((eq skip 0) t) (t (setq i (+ i skip -1)) (funcall get-next-frame))) Not much difference. Also, `0 could just be 0. One thing it does do: avoids repeating "skip" in the first two tests. That's the only merit I can see, but would have been more worthwhile if there were, say, 10 value tests. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2