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: Update of pcase docs for the elisp manual Date: Tue, 26 Jan 2016 08:59:42 -0800 Message-ID: References: <87d1stznc6.fsf@web.de> <83io2k5yvg.fsf@gnu.org> Reply-To: John Wiegley NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1453827724 10867 80.91.229.3 (26 Jan 2016 17:02:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Jan 2016 17:02:04 +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 Tue Jan 26 18:01:53 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 1aO704-0001iy-EC for ged-emacs-devel@m.gmane.org; Tue, 26 Jan 2016 18:01:53 +0100 Original-Received: from localhost ([::1]:45127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aO703-0004HH-O8 for ged-emacs-devel@m.gmane.org; Tue, 26 Jan 2016 12:01:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aO6yC-0001Sm-W0 for emacs-devel@gnu.org; Tue, 26 Jan 2016 11:59:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aO6yB-0000Aw-Ve for emacs-devel@gnu.org; Tue, 26 Jan 2016 11:59:56 -0500 Original-Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]:33939) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aO6y8-0000AK-5i; Tue, 26 Jan 2016 11:59:52 -0500 Original-Received: by mail-pa0-x235.google.com with SMTP id uo6so102265607pac.1; Tue, 26 Jan 2016 08:59:51 -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:reply-to:mail-followup-to:mime-version:content-type; bh=0c+ga2fnLXBK+HKViuKA4Hm9ahmXr79VFSIjrMOk/R4=; b=W6WaZSrEKrBJw8Cl7QjuFiuaZWc94Zr8hBxvrrVs2QXN1+63farAJPLcyexS9j8jb8 uzz9AHzny1iRp5hmV/Q5fleeJ9bl+7m5qU8tZV+Map/tg4jtb2Ger42glLQ5dUL8rl+L +YN1xx8+0PwZKws/zpn+4X2+nP25vG5Nn/+YfEbZzmpzSaxcCGEX/kocluHHNZt8BJ69 RwPnDO5Y9Dx/h9t2uMhfuW+CMolSu2etsnvALXmWZZpSEfoFntGr5k5ABGMsRC5LbALY kRQLwVHKvh4GJ3uH0uQYuOyegiLjEibtbMRbyiCFJnuCl/AE5d2lMoca+I5lEs0KMc8J h/ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :references:user-agent:reply-to:mail-followup-to:mime-version :content-type; bh=0c+ga2fnLXBK+HKViuKA4Hm9ahmXr79VFSIjrMOk/R4=; b=k/bJAwcn1XJxT6XftDiSQ0wNQwJb/Zs5DPMYIxOGb73O2C1aAJt7myjqGukYLAWCFx FFCEszTe1SG396HTN3ADpLS/FaGFS4j7TPZjK9YomAus6SdDkR6MPGlXF9McefyIPRcK dG+9flqlsGVx4X0gLnWLDDxxcdIWAjiyKhel9JykiCXTNb4nGMJvAy/RluyRw/qm0UDr iRWPHyIPnxQ7M3a1IwIpqgTRBwxO3/mpA29fCo166lSzU2OSZiAsTmJ6LoLNPFxdxe+a WZvueyG9HFN5Jdy5s65oIjLpdO88hkKc+9ok0WBCi8oanpds4SM10ApEz9Bd92T7pqWg LGJg== X-Gm-Message-State: AG10YOQca1ZpT0fLbmsa63V03rULKiCU4pp2tpXrjGOuUBgnePUGmRk+318buPF5EjblHA== X-Received: by 10.66.255.70 with SMTP id ao6mr35210838pad.64.1453827591267; Tue, 26 Jan 2016 08:59:51 -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 k74sm3018891pfj.49.2016.01.26.08.59.50 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 26 Jan 2016 08:59:50 -0800 (PST) X-Google-Original-From: John Wiegley Original-Received: by Vulcan.local (Postfix, from userid 501) id A7D8512948F52; Tue, 26 Jan 2016 08:59:49 -0800 (PST) In-Reply-To: <83io2k5yvg.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 23 Jan 2016 13:17:07 +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::235 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:198859 Archived-At: >>>>> Eli Zaretskii writes: > I updated the docs, thanks to both of you. I used your text, John, and also > Michael's pcase-guide.el as the starting points, source of inspiration and > examples, and sometimes source of swaths of text as well. I also used what > was already in the manual. The end result, for which I accept full > responsibility (although you are named as co-authors), is in the repository; > please take a look and comment, modify, and improve as appropriate. In > particular, the UPattern example needs to be improved as the comment there > says, please do so if you have time. Thanks Eli, just two questions from me: - Is there any way we can get rid of the phrases QPattern and UPattern? There's decades of prior literature on pattern matching in functional languages, and none of them use "QPattern" and "UPattern". We're inventing terms that make no sense at all to newcomers, except for the single-letter correspondence with "quoted" and "unquoted". What if we just call them "quoted patterns" and "unquoted patterns", if that is what we mean? I still vote for "literal" and "logical", since a literal pattern matches by literally being the same value as the input, while a logical pattern matches due to the logic of the pattern. - The docs say "UPatterns are simpler, so we describe them first." Don't UPatterns represent the entire complexity of `pcase'? How are they simpler? -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2