From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Update of pcase docs for the elisp manual Date: Tue, 26 Jan 2016 22:19:12 +0200 Message-ID: <83zivsytz3.fsf@gnu.org> References: <87d1stznc6.fsf@web.de> <83io2k5yvg.fsf@gnu.org> <838u3c18w3.fsf@gnu.org> <86oac85d09.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1453839550 15217 80.91.229.3 (26 Jan 2016 20:19:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Jan 2016 20:19:10 +0000 (UTC) Cc: emacs-devel@gnu.org To: Andy Moreton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 26 21:19:06 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 1aOA4s-0007N3-Ou for ged-emacs-devel@m.gmane.org; Tue, 26 Jan 2016 21:19:02 +0100 Original-Received: from localhost ([::1]:46534 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOA4s-0002mx-3o for ged-emacs-devel@m.gmane.org; Tue, 26 Jan 2016 15:19:02 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOA4f-0002ms-6q for emacs-devel@gnu.org; Tue, 26 Jan 2016 15:18:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOA4c-0000mE-1L for emacs-devel@gnu.org; Tue, 26 Jan 2016 15:18:49 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOA4b-0000mA-Tk; Tue, 26 Jan 2016 15:18:45 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1592 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aOA4Z-0002iN-Bb; Tue, 26 Jan 2016 15:18:44 -0500 In-reply-to: <86oac85d09.fsf@gmail.com> (message from Andy Moreton on Tue, 26 Jan 2016 19:58:30 +0000) 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:198881 Archived-At: > From: Andy Moreton > Date: Tue, 26 Jan 2016 19:58:30 +0000 > > >> - The docs say "UPatterns are simpler, so we describe them first." Don't > >> UPatterns represent the entire complexity of `pcase'? > > > > On the implementation level, yes. But that's not really relevant for > > the documentation (except that we really should say so and give an > > example). > > > >> How are they simpler? > > > > They are to me. They use undecorated symbols, and don't require the > > quote/unquote games. If that doesn't explain why they are simpler, > > then I don't know how to explain it, but the gut feeling is very real. > > It seems to me that the distinction in the pcase interface is between > primitive patterns that are irreducible, and composite patterns that are > built by composing primitive patterns. That's one possible way of looking at the issue. But to me it doesn't make a lot of sense, because when I learn a new tool, I don't necessarily want to study its internal design right there and then. First, I want to learn to use it. And for that, the required mental model doesn't need to reflect the internals too closely, and doesn't have to be mathematically rigorous. It just needs to make sense. > The other thing that is important for documentation is that each pattern > needs to describe what the pattern matches, and what bindings are made > if the pattern matches. I hope that's exactly what I did. > Of course I am not an experienced macrologist, but an ordinary emacs > user trying to make sense of how pcase works. I tried to look at the issue through the eyes of such a user.