From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Question on pcase Date: Sat, 24 Oct 2015 17:22:58 +0000 Message-ID: <20151024172258.GA2731@acm.fritz.box> References: <871tcngdv2.fsf@gmail.com> <87k2qe1u09.fsf@web.de> <83r3kmrtat.fsf@gnu.org> <87r3kl22zk.fsf@web.de> <837fmdzpf2.fsf@gnu.org> <87oafp659p.fsf@web.de> <831tclzly9.fsf@gnu.org> <87fv115t20.fsf@web.de> <20151024090146.GA1849@acm.fritz.box> <4f8ca905-8222-48d5-b7a2-21c0ee40bfb5@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1445707312 31747 80.91.229.3 (24 Oct 2015 17:21:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Oct 2015 17:21:52 +0000 (UTC) Cc: Michael Heerdegen , Eli Zaretskii , Oleh Krehel , Emacs Development To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 24 19:21:42 2015 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 1Zq2Vd-0003n4-8D for ged-emacs-devel@m.gmane.org; Sat, 24 Oct 2015 19:21:37 +0200 Original-Received: from localhost ([::1]:45078 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zq2Vc-0006VG-MW for ged-emacs-devel@m.gmane.org; Sat, 24 Oct 2015 13:21:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zq2VP-0006V4-TG for emacs-devel@gnu.org; Sat, 24 Oct 2015 13:21:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zq2VK-00061h-W4 for emacs-devel@gnu.org; Sat, 24 Oct 2015 13:21:23 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:24720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zq2VK-00061T-Kt for emacs-devel@gnu.org; Sat, 24 Oct 2015 13:21:18 -0400 Original-Received: (qmail 46917 invoked by uid 3782); 24 Oct 2015 17:21:16 -0000 Original-Received: from acm.muc.de (p5B1464C0.dip0.t-ipconnect.de [91.20.100.192]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 24 Oct 2015 19:21:15 +0200 Original-Received: (qmail 2765 invoked by uid 1000); 24 Oct 2015 17:22:58 -0000 Content-Disposition: inline In-Reply-To: <4f8ca905-8222-48d5-b7a2-21c0ee40bfb5@default> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.3 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:192561 Archived-At: Hello, Drew On Sat, Oct 24, 2015 at 10:00:05AM -0700, Drew Adams wrote: > Good comments about the language, Alan. Thanks! > One suggestion: > > 5. "the `pred' pattern form allows to simplify ...." is a very common > > solecism. The verb "allow" needs a direct object, not an infinitive verb. > > That object can either be the person (or thing) who is being allowed to do > > something, or the thing (a noun or gerund) which is being allowed. So > > here, you'd want one of > > o - "the `pred' pattern form allows YOU to simplify ...." or > > o - "the `pred' pattern form allows THE SIMPLIFICATION OF ...." or even > > o - "the `pred' pattern form allows SIMPLIFYING ...." > It's usually simpler and clearer to use "let" than "allows > ... to". Linguistically, "let" is as complicated as "allow". It's also a bit more restrictive: you need as the direct object the person (or thing) which is being "let" do something. This is followed by the infinitive without the "to": o - "the `pred' pattern form lets you simplify ...." > But it is usually better still to put the user first, as the active > subject of the action: Yes, perhaps, sometimes, maybe, .... > You can use `pred' to ... > or if it's not clear what `pred' is: > You can use pattern `pred' to ... > or: > You can simplify ... using `pred'. > The user is the actor; pattern `pred' is the tool. > (I did not look at the original, but a guess might be that > someone reading Info should see PRED here (no quotes), not > `pred'. You're wrong here. :-) `pred' is an actual keyword in the pcase mechanism. (What exactly is the English for the German "Konzept"? That's what I really wanted at the end of that sentence.) > Another guess, again without consulting the text, is that perhaps you > don't need both "pattern" and "form": "pattern form".) I think they're both meaningful - the "pattern" is a description of what is being matched, and the "form" is the lisp form which achieves this matching. I think. > And I too thank Michael for helping us (all) understand the > obtuse creature that is `pcase'. It is comforting (and all > too rare, it seems) to see such careful interest in helping > Emacs document itself. Kudos - very helpful. Very helpful indeed! -- Alan Mackenzie (Nuremberg, Germany).