From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.tangents Subject: Re: The poor state of documentation of pcase like things. Date: Sun, 3 Jan 2016 06:56:11 -0800 Message-ID: <5689368B.2080404@dancol.org> References: <20151216202605.GA3752@acm.fritz.box> <87io3m60bq.fsf@web.de> <877fk1nnk0.fsf@web.de> <8760zlue3j.fsf@gmail.com> <87vb7kajgv.fsf@web.de> <83y4c9ag06.fsf@gnu.org> <87bn95m9eg.fsf@fencepost.gnu.org> <5686CDFB.2010105@dancol.org> <83fuygcs5g.fsf@gnu.org> <56886E32.70305@yandex.ru> <83si2f9ve4.fsf@gnu.org> <56889EC3.3040108@yandex.ru> <877fjrkpdf.fsf@fencepost.gnu.org> <56892334.4000106@yandex.ru> <8760zakb7q.fsf@fencepost.gnu.org> <56892BDA.6060103@dancol.org> <871t9yk98g.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="D7k6drOofdWC3EhUDQAPbroBOFGKR6Pbo" X-Trace: ger.gmane.org 1451832992 10106 80.91.229.3 (3 Jan 2016 14:56:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Jan 2016 14:56:32 +0000 (UTC) Cc: michael_heerdegen@web.de, Eli Zaretskii , emacs-tangents@gnu.org, Dmitry Gutov To: David Kastrup Original-X-From: emacs-tangents-bounces+get-emacs-tangents=m.gmane.org@gnu.org Sun Jan 03 15:56:26 2016 Return-path: Envelope-to: get-emacs-tangents@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 1aFk53-0006co-GI for get-emacs-tangents@m.gmane.org; Sun, 03 Jan 2016 15:56:25 +0100 Original-Received: from localhost ([::1]:41822 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFk52-0005SP-Ms for get-emacs-tangents@m.gmane.org; Sun, 03 Jan 2016 09:56:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFk50-0005SH-3y for emacs-tangents@gnu.org; Sun, 03 Jan 2016 09:56:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aFk4v-00037n-4F for emacs-tangents@gnu.org; Sun, 03 Jan 2016 09:56:22 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:37751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFk4u-00037d-Rc; Sun, 03 Jan 2016 09:56:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject; bh=9RnErfRKbHJkPjqGZdI/sULJRcpi0DJI+MxblEHkS58=; b=DzYBcZcuFUtPOmXdgsrCE+YOm9L6wVFOyxsyNp55II9CcamxK4lEABJpaqkmjI9+z16nY1bSeTxLfqwCYxB9ubprZ0HqSNpoAUqxykm+MtjTfO95DuziM5wayClqki9QYq3auIjh76ZOxrVWJsVHrm8Y7bBa/SrIIrhund6jrYLdhNi+OdbYOfyddda1/yLlrFDuKi6XafTJd6g7Pq2HfYJ0FRZ6SpziqDj7pJEAttfEwhljM32BcEWn3dnfdroK685+6fKFMsHpKdl/+/ikrYcFKZLYTXnVJbg5WMqZrYx5L8pqBHZumcJWoLfsixuaOjedXG9DVrk8CYd/BRIFIQ==; Original-Received: from c-67-161-115-4.hsd1.wa.comcast.net ([67.161.115.4] helo=[192.168.1.210]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1aFk4t-0005Hh-AQ; Sun, 03 Jan 2016 06:56:15 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 In-Reply-To: <871t9yk98g.fsf@fencepost.gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-tangents@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-tangents-bounces+get-emacs-tangents=m.gmane.org@gnu.org Original-Sender: emacs-tangents-bounces+get-emacs-tangents=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.tangents:63 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --D7k6drOofdWC3EhUDQAPbroBOFGKR6Pbo Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 01/03/2016 06:50 AM, David Kastrup wrote: > Daniel Colascione writes: >=20 >> On 01/03/2016 06:07 AM, David Kastrup wrote: >>> Dmitry Gutov writes: >>> >>>> On 01/03/2016 11:02 AM, David Kastrup wrote: >>>> >>>>> Uh what? Whether pcase does not help with simple cases should have= >>>>> little bearing on whether it helps with more complex cases. >>>> >>>> But it does. It takes less code, >>> >>> You mean, less input. >> >> A side effect of a more expressive system. >> >>>> and follows the common design of pattern matching, which isn't hard = to >>>> understand and internalize. >>> >>> And yet Emacs has more than just regexp operations for dealing with >>> strings, and most string operations are carried out without reverting= to >>> regexps. >>> >>>> In the more complex cases, the syntax may have some thorns, >>> >>> Then it's not doing a good job of reducing complexity. If it require= s >>> me to use quasiquote for stuff that contains neither unquote nor >>> unquote-splicing (and has no sensible interpretation of unquote-splic= ing >>> in connection with its own use of quasiquote anyway), it does a bad >>> human interfacing job. Why do I need to quote self-quoting expressio= ns >>> at all? And why do self-quoting symbols differ in meaning when prece= ded >>> by quasiquote? In Lisp, `nil is equivalent to nil . That's not what= >>> pcase sees, I think. >> >> I find pcase quite readable; it's not going away. >=20 > So it should not get fixed or made more consistent with expectations? >=20 >> Honestly, I also found the existing documentation completely adequate.= >=20 > The problem is that its underlying design principle, matching quoted > stuff structurally/literally and using unquoted symbols as variable > names, is only implemented in a cursory manner. That means that readin= g > a pcase expression and understanding what it does does not enable you t= o > fix it with confidence or write your own. I find it adequately general --- much more so than, say, destructuring-bind. Do you have a concrete proposal? --D7k6drOofdWC3EhUDQAPbroBOFGKR6Pbo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJWiTaLAAoJEN4WImmbpWBlpwoP/A+Wnc+JWBlBbmHst9QRdVFI mX7X7khQ8ElwkmUKQ9zbkcruLQvLG2pQP8q3AeEuWygLgDkSRHmOFsBP2xTGRisL LiexHkraUj45F6MxmYCSTjF5D0ZVOyy6JKUR4/rhL7eOqicG7/V3rq6ewz+iqvy6 jhyqdUqHHsP0wyQB3DafyVFqJl1pHgrbLIVQMlLTxDUQS1UjvaP5HNo1HMlLTEAZ Ux61hKrrAgis4OG8ONndrJvaO1v0DErnC/zkY/9qD1q7qInjTKlAjCiSzvfmu9ei zjQ2MzHR3MmbLLjIVXIlJmyRObGIqhhL23woNfsqcfTsKvGIWrKkwNON8F3pRcvy BumOxPno9vqjkSh6x6PuLRks7p/emc7VAsiY2BvDPLb9RW/cPMf+BWOQyXdOI69l mskOPc4jsPeyul6Iac7rcw6DzvXIPbC5tOaHGp3H6WsMwe6gzUYNBs2OCG/1jop6 cxDJCy30xAayXAk+q5Lppbtn6POZgesllH2RHzslw/tGRUgOpHwGKuiWroF53+hP RwGwYTWUSFNEWEwZptQXambDKIlYR2PuiBKH4kbUTtol7HQv5KdTCB+lS2LcBOMi 5o1ZRapdtBjucDBNRT0JqpCuP3D/OwL7epF/Dl+zsidDeDvQub5N0AIJzSzZ33t/ L0GiJyUUkWcAbKQ0oNa/ =gtso -----END PGP SIGNATURE----- --D7k6drOofdWC3EhUDQAPbroBOFGKR6Pbo--