From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: Replace trivial pcase occurrences in the Emacs sources Date: Sat, 03 Nov 2018 16:45:08 +0100 Message-ID: <87o9b62mij.fsf@web.de> References: <83r2g8klf9.fsf@gnu.org> <83wopzk3sw.fsf@gnu.org> <83r2g7jrot.fsf@gnu.org> <83k1lzjq0r.fsf@gnu.org> <83in1jjmy4.fsf@gnu.org> <20181031120821.GA20575@ACM> <831s86jey9.fsf@gnu.org> <83wopue1xl.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1541259840 14992 195.159.176.226 (3 Nov 2018 15:44:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 3 Nov 2018 15:44:00 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 03 16:43:56 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 1gIy5b-0003md-Sl for ged-emacs-devel@m.gmane.org; Sat, 03 Nov 2018 16:43:55 +0100 Original-Received: from localhost ([::1]:55994 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIy7h-00026I-Uq for ged-emacs-devel@m.gmane.org; Sat, 03 Nov 2018 11:46:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53068) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIy7b-000262-FL for emacs-devel@gnu.org; Sat, 03 Nov 2018 11:46:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gIy7a-0000UG-L0 for emacs-devel@gnu.org; Sat, 03 Nov 2018 11:45:59 -0400 Original-Received: from mout.web.de ([212.227.17.12]:50889) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gIy7W-00089G-K7; Sat, 03 Nov 2018 11:45:54 -0400 Original-Received: from drachen.dragon ([94.218.210.177]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LudKu-1fancU0P68-00zqAL; Sat, 03 Nov 2018 16:45:10 +0100 Original-Received: from drachen.dragon ([94.218.210.177]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LudKu-1fancU0P68-00zqAL; Sat, 03 Nov 2018 16:45:10 +0100 In-Reply-To: <83wopue1xl.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 03 Nov 2018 15:16:38 +0200") X-Provags-ID: V03:K1:bAxjdKwxdnIjzS4xJIytMYHn3Dyj7r8J5iqw9mruKyzY6h+8kdk FQKSOkI2F4uZCFDvlSaF9BkZ7J99kRPUQwBd/HlGimFnXbMZaccLtmCxCbhHrepDepznNFX TN0YAo45Pco6xnpRNccIGy+36wOomFpa8dvi5yORuP9boeLN96xptZ70iL1fs6MAnwyQ5Ba k0+ImQaja9d3E8dPLeO1g== X-UI-Out-Filterresults: notjunk:1;V01:K0:vtTEbsiSIm4=:Ndnp6xIWCj99apCXr839Js 8si8M1TB2YHmWpWaVLX9ViA7oUL/nftBHcVMBD93bumVAFrb9bH2texBxyfEGaCOWfORn8EVf ZstRl1NByVqT0A/ynRXMQUQlzuUy5ukZKQrA7INsDEPfvW6j5DEPOzguOc+L0W4cq0z3YXT6e x/2N6xy78+d1DQS1kj0Vn0PEdGPM9QdNznlYKRDTJJfOrQBqYD0km2pRozGTxbaAF488PF2GN ZXuQ1pHgic/LZSn0JSqNfM2WqlE73rDOHg43I2CdEnH5RmqH4jmoDhbYgNNW2oGIswePvcoSJ PprfUYbAsPwNsiMGWqSCeVMgtGWG29HZE/qWAuWbQ7LbtvZ6gDSxTqvkMpYEPARs5Jq0p4mcc RS/GDLjkQkuD1fG2jn7Oi98LTioTNW3ke/26sfT4R0/mhlH4qnDbRJ8mvJ5o5XlHQ/ZfC2FjI hAm7qYtuuexgQhJnZ2WCfwUkAE71yg8DTyZ9YfGWSy+M08Cnlx8epASuREiDUAMoknAMaXfgE iT3LVaIZEp6EgFivfC3na+eHTGd3H7J2tWk05PJKtx4G3kxDMN70tT57OZAzca1m583eZtvX3 CsvTJz0ydLtSO3ZrQRoMFkFj8hx1GoSNBDQai/w5U/7yqjYzGGcgHl3zrNPjJkXTn1ZbXit44 UEpBZqbpLWj/2U5fzgClPUfsAXmfeSDDstdpAvvzGw+sGj3zQSP24+YA27kS5AO01o3U5h0li rsYsMzMenV7JmnnFKFB9MjEiFxsvfmIf1UkQwsi7kb1phsBBk0pNXTTwiZlyK1HdTJTtkB9v X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.12 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:230993 Archived-At: Eli Zaretskii writes: > Done, I hope. Great, thanks Eli. Some comments/thoughts: control.texi line 521 "is equals": typo. | The pcase patterns that are useful for destructuring bindings are | generally those described in @ref{Backquote Patterns}, since they | express a specification of the structure of objects that will match. I don't like that sentence for two reasons: (1) ` is the pcase pattern for destructuring. The "Backquote Patterns" or "Backquote style Patterns" are not really "pcase patterns" since they are part of the implicit semantics ``' defines. They are _not_ pcase patterns. Your sentence confuses the both. (2) We already have a lot other patterns for destructuring (eieio, seq, map, cl-struct), and we probably will get even more in the future. | @defmac pcase-let bindings body@dots{} | Perform desctructuring binding of variables according to | @var{bindings}, and then evaluate @var{body}. and lots of similar: `pcase-let', `pcase-dolist' and the like are very often used only for destructuring, but they are not limited to destructuring. Like in (defun test (arg) (pcase-let (((or (and (pred stringp) s) (and (pred numberp) (app number-to-string s))) arg)) s)) (test "Hallo") => "Hallo" (test 1) => "1" Also the docstrings give the impression that these are limited to destructuring, which is not true. Michael.