From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Replace trivial pcase occurrences in the Emacs sources Date: Tue, 30 Oct 2018 11:00:47 -0400 Message-ID: References: <83tvlcsnee.fsf@gnu.org> <86mur137n8.fsf@gmail.com> <20181029130132.GB4195@ACM> <20181029134722.GC4195@ACM> <83r2g8klf9.fsf@gnu.org> <83wopzk3sw.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1540912663 25072 195.159.176.226 (30 Oct 2018 15:17:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 30 Oct 2018 15:17:43 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 30 16:17:39 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 1gHVlx-0006PM-R1 for ged-emacs-devel@m.gmane.org; Tue, 30 Oct 2018 16:17:37 +0100 Original-Received: from localhost ([::1]:53837 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHVo4-0008GT-9Z for ged-emacs-devel@m.gmane.org; Tue, 30 Oct 2018 11:19:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHVWd-00081A-An for emacs-devel@gnu.org; Tue, 30 Oct 2018 11:01:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHVWY-0006p6-3d for emacs-devel@gnu.org; Tue, 30 Oct 2018 11:01:47 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:53225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHVWX-0004rZ-I8; Tue, 30 Oct 2018 11:01:41 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w9UF0mUC029190; Tue, 30 Oct 2018 11:00:49 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id EC6FE6A40C; Tue, 30 Oct 2018 11:00:47 -0400 (EDT) In-Reply-To: <83wopzk3sw.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 30 Oct 2018 14:38:23 +0200") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6407=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6407> : inlines <6947> : streams <1802819> : uri <2741114> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 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:230829 Archived-At: >> (dolist (x LIST) (pcase-let ((PATTERN x)) BODY)) > You aren't saying that showing the code removes the need for any > documentation of what it does, do you? ;-) I think I am, yes. In cases like these where the definition is really just a trivial combination of two less trivial elements, it might be a better option for the docstring, since it is both more concise and more precise than whatever wording we can come up with to try and repeat what dolist and pcase-let do. Stefan