From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: Question on pcase Date: Sat, 24 Oct 2015 21:10:49 +0200 Message-ID: <87ziz8nkue.fsf@gmx.net> 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> <878u6spgmp.fsf@gmx.net> <20151024174719.GB2731@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1445713877 28020 80.91.229.3 (24 Oct 2015 19:11:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Oct 2015 19:11:17 +0000 (UTC) Cc: Michael Heerdegen , Eli Zaretskii , Oleh Krehel , Emacs Development To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 24 21:11:07 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 1Zq4DX-0008An-1x for ged-emacs-devel@m.gmane.org; Sat, 24 Oct 2015 21:11:03 +0200 Original-Received: from localhost ([::1]:45385 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zq4DW-0003uX-Nk for ged-emacs-devel@m.gmane.org; Sat, 24 Oct 2015 15:11:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zq4DS-0003uM-Px for emacs-devel@gnu.org; Sat, 24 Oct 2015 15:10:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zq4DR-0001qC-Kk for emacs-devel@gnu.org; Sat, 24 Oct 2015 15:10:58 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:51937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zq4DL-0001ph-RQ; Sat, 24 Oct 2015 15:10:51 -0400 Original-Received: from rosalinde ([89.245.104.45]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MUTSJ-1Zy0JF1Zit-00RLSA; Sat, 24 Oct 2015 21:10:50 +0200 In-Reply-To: <20151024174719.GB2731@acm.fritz.box> (Alan Mackenzie's message of "Sat, 24 Oct 2015 17:47:19 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:e98awFaDEdvvOlb0d4lRajdLNYfh3yoXQ65HIyjr/RCn19hsrF0 dZEZ3lrhm7i1X6gMmOYMeKa8QKBx+RXAMRnto4C3UrvrJg0wEh744Tic2y20vnlxp0yydcD NBGHjbaxYO1aQ4RxPcrAwfm2Bp7Vkr76iAqLpd17Ac7dQlj082aTLp2uO5gcc3WUN8whdml 71Z+Moym7cCLAvFFqCRVg== X-UI-Out-Filterresults: notjunk:1;V01:K0:tuzL57/+P9Q=:u5xbja4UL88tPd8uFRRP5a QVhYiiYz3gpBVfAseHrLBMUcSF557tiA7G782oQTA8/YsWdNBArU0/AyhEIUAQ1uCVMl9ZWFt 3GmsZXH+OujMBAPQLb63xp7miMZ72e2zJrHYaNLEhGHqnkcbPbn8ZUKRtfB4uYFDh8cG73gck bfAgH0slKAEz0Zbg+Ur2cBFG48EHplneGVLbFnH3RhqPLh2OYSFlNrGe1kwgyMq/6SYChKDdu eQ8uWLZ3gtMrGp6wG/etzEE9U2V7LdMBJf+8xh/KJJTPy7q/+jEPS3J1JkJXeU9ojYvBUi5uA RdGnTfEw1rm75Z6GgPxGvXzB9ztTpiC0onhnLh7aH6Z4PPu4rmQBip9hXUeoE0j8m95rh1vm9 N/jVkKO4YxnM1zi8w62G1N1qbkdoco2nOWb2FaxBGUZZhX2yAnFamt41KTv67AvXAtmPLzISZ DVUKG73GbgpgFXTWRFjJVk8lIiCoyK+uRN9p8CCApx6yJxXRxDFx5hOIHxVe1Qhe6d9Btky/p MoSRejeC5d7IZX4fGP0JPZKLV+KkwjiJ/u9WM68JgZAEh0kRkLZXBYkYpOwEIYqQrwXHcJsMX Fun+dCO77T5BD4g8D+361CDKcaHP785XyFtekWQMzYlC87PsEO5+Yr6CJui7y18hwyGAIa0aW trgwvt6AROHviu9xwbCAa3jfqnQSjSIW66TSQlY4TwGfsMIJShAwiI1uCHHdBvQppL1+1vtg4 ge1SNij2k+oCnv/Wod5y0UhnJsQhWSIhBcqqkHro48/C2NAXnJD3CrwgouWvvC6sCmWQQ1Rm X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.21 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:192579 Archived-At: On Sat, 24 Oct 2015 17:47:19 +0000 Alan Mackenzie wrote: >> > ;; This is a pattern form that allows you to match a pattern PAT >> > ;; against an _arbitrary_ expression EXP. This is not special, >> > -;; matching PAT is done as you have learned, just against the EXP you >> > +;; matching PAT is done as you have learned, just on the EXP you >> > ;; specify there, and not the EXPRESSION given to pcase at top level. > >> Why replace "against" with "on" here but not in the preceding line? I >> think "against" is usual in this context. A somewhat better formulation >> is this, IMO: "The only difference from the pattern matching you have >> learned is that PAT is matched against the EXP you specify here..." > > Oh, no! This is complicated, too.=20=20 It doesn't strike me as more complicated than the original, just a bit less stilted (to my ears). > Perhaps the best preposition for > "match" here is "with", on the grounds that harmony is expected rather > than a fight. You might match one sporting team against another, but > you'd match the colour of an item of clothing with that of another. Or > something like that. "Match with" sounds out of place here. I think "match against" is pretty much standard in the context of pattern matching in formal or programming languages; cf. these quotes (among many similar) from Friedl's _Mastering Regular Expressions_ (3rd ed):=20 "A collating sequence allows you to match against those characters that are made up of combinations of other characters." (p128) "This means that multiple regexes can match against a string, in turn [...]." (p130) "Thus, when trying to match =EF=BD=A2ORA=EF=BD=A3 against FLORAL, the first= attempt at the start of the string fails (since =EF=BD=A2ORA=EF=BD=A3 can=E2=80=99t ma= tch FLO)." (p148) "Let=E2=80=99s consider one way an engine might match =EF=BD=A2to(nite|knig= ht|night)=EF=BD=A3 against the text =E2=80=98...tonight...=E2=80=99." (p153) "The regex-directed NFA engine might waste time attempting to match different subexpressions against the same text [...]." (p156) >> > -;; If you are used to understand grammers: the above description of >> > -;; `QPAT describes a quite simpel grammer. You make like to try it >> > +;; If you are used to understanding grammars: the above description of >> > +;; `QPAT describes a quite simple grammar. You might like to try it > >> I think a somewhat better formulation is this: "If you are familiar with >> formal language grammars, the above description..." > > Possibly. But that's rewriting the original, rather than correcting it. Well, "If you are used to understanding grammars" sounds peculiar to me, and in the context seems to mean nothing else than "If you are familiar with formal language grammars", so I do think it more a correction than a rewrite. But it's up to Michael Heerdegen or whoever will maintain this document. Steve Berman