From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#31311: 27.0; doc of `pcase' Date: Sat, 26 May 2018 08:26:02 -0700 (PDT) Message-ID: <33cb1c7a-38a2-4d74-a266-51be5b636552@default> References: <83wowqrmp8.fsf@gnu.org> <87efixlv8g.fsf@web.de> <83muxlsvfm.fsf@gnu.org> <871sexlqvw.fsf@web.de> <83k1sps9n3.fsf@gnu.org> <87wowpndoo.fsf@gmail.com> <87fu3c6cm3.fsf@gnuvola.org> <83zi1kqynx.fsf@gnu.org> <871seh3yw8.fsf@gnuvola.org> <877eo9kmid.fsf@web.de> <87y3gl574j.fsf@gnuvola.org> <87po1xc5lb.fsf@web.de> <87muwz6ftl.fsf@gnuvola.org> <874lj7r5mx.fsf@web.de> <878t8e2lw1.fsf@gnuvola.org> <83in7ecrxo.fsf@gnu.org> <87r2m22ndx.fsf@gnuvola.org> <87tvqwfxzv.fsf@gmail.com> <87fu2e23jy.fsf@gnuvola.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1527348312 12787 195.159.176.226 (26 May 2018 15:25:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 26 May 2018 15:25:12 +0000 (UTC) Cc: Noam Postavsky To: 31311@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 26 17:25:08 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1fMb47-0003Dt-KN for geb-bug-gnu-emacs@m.gmane.org; Sat, 26 May 2018 17:25:07 +0200 Original-Received: from localhost ([::1]:49356 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMb6E-0001XN-Eh for geb-bug-gnu-emacs@m.gmane.org; Sat, 26 May 2018 11:27:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMb61-0001WF-Kc for bug-gnu-emacs@gnu.org; Sat, 26 May 2018 11:27:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMb5y-0001tr-Gd for bug-gnu-emacs@gnu.org; Sat, 26 May 2018 11:27:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41912) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fMb5y-0001tY-9L for bug-gnu-emacs@gnu.org; Sat, 26 May 2018 11:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fMb5y-000338-0O for bug-gnu-emacs@gnu.org; Sat, 26 May 2018 11:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 May 2018 15:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31311 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31311-submit@debbugs.gnu.org id=B31311.152734837211658 (code B ref 31311); Sat, 26 May 2018 15:27:01 +0000 Original-Received: (at 31311) by debbugs.gnu.org; 26 May 2018 15:26:12 +0000 Original-Received: from localhost ([127.0.0.1]:49809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fMb5A-00031y-G4 for submit@debbugs.gnu.org; Sat, 26 May 2018 11:26:12 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:39502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fMb58-00031l-Ur for 31311@debbugs.gnu.org; Sat, 26 May 2018 11:26:11 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4QFPqME066723; Sat, 26 May 2018 15:26:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=6qMVVfRk+3WUKkGGlR0hsN5sYmpR+iaCgPD0OYb770g=; b=WU08SSLceWIXrfb+kFq4iP9W2uaisnNRTM1pXaRVGQXy3e0UkxlE2xszsf4qPJau1dUP s4Uo1VsEANOHYKqddlg5acpZMG0EYW/ze5Dq8f7rWTYn211S7g+mhbWzZxIFIvI0dtK3 1f4jZlZk25ayUPMXOt2RbM0sGoxWxiERRFmGDtnyrwYNQkN/lJ1Wnc+0FN9Vba58H5OT kLmTgpU1UW6097NyHVtZ/8Ebq+OUzh3G4U5nUJNijntkyGK4zkYuJdYabqdZ73kW7xnt L9bSuXlIv5VwzgXfI124ZC22HNU8dLWn5LJG5n96iXeZQ8ubnaqT4IHldRSx/4+mJJlx Sw== Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2j7084s25u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 26 May 2018 15:26:05 +0000 Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w4QFQ4ZV001885 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 26 May 2018 15:26:04 GMT Original-Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w4QFQ3rP029323; Sat, 26 May 2018 15:26:03 GMT In-Reply-To: <87fu2e23jy.fsf@gnuvola.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4690.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8905 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=15 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=664 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805260182 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:146570 Archived-At: > The manual should refer to `cl-case', not `case'. I disagree. My (unsolicited) 2 cents: `case' is aliased to `cl-case', IF you load `cl.el' at byte-compile time. It has always been so, and it should remain so. Or the other way around: we should instead alias `cl-case' to `case'. Encouraging everyone to instead load `cl-lib.el' does _not_ provide `case'. If `cl-lib.el' is to be the way to go then it should itself provide the alias. Dunno whether this lack was an oversight or deliberate, but it is a step backward. We now (rightfully) encourage users to load `cl-lib.el' instead of `cl.el', but we no longer bother to encourage loading `cl.el' at compile time to pick up macros. But no one should even need to load `cl-lib.el' (or `cl.el' at compile time). Emacs should itself have `case', prominently and first class. And it is fine if the Emacs `case' is also the Common Lisp `case', or close to it. The same should be true elsewhere: Emacs appropriating Common Lisp constructs is fine and dandy. But yes, of course, as long as `case' (aka `cl-case') is not *exactly* the same as the Common Lisp `case' the two should remain aliased, and any differences from Common Lisp should be documented. But users should first and foremost see `case', not `cl-case'. It should be as prominent as `cond' and `if', `when', and `unless' - ALL of which also exist in Common Lisp. We don't call them `cl-cond', `cl-if', `cl-when', and `cl-unless'! And rightfully so. Preload the `cl-case' definition in Emacs, call it `case', and alias `cl-case' to it. There is no reason to force or encourage people to use `cl-case' instead of `case'. The opposite is true - they should be encouraged to use `case', not `cl-case'. Emacs deserves `case', and it has `case' - you just have to know about jumping through a hoop to reveal it. [We even had the extreme position a few years ago that an eager-beaver mmaintainer forced names like `cl-caddr' on Emacs. Fortunately, that craziness was eventually rescinded. http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg01394.html ] _______ On a related subject, `pcase', and especially its derivatives, should be renamed. These things are not (are no longer) about a kind of `case'. Their names should share a common root, yes. But it should not be just `p', and it should definitely not be `case'. Their names should have a root that suggests pattern matching and, at least in some cases, binding/destructuring. (Start a contest to find a good root name. ;-)) > I did =E2=80=98s/case/cl-&/g=E2=80=99 in commit 468e82790f1 Too bad. That's a step backward, not forward, IMHO. =20 > Many computer languages have an intrinsic case-ish construct, so > it was a bit surprising for me to learn that =E2=80=98case=E2=80=99 in Em= acs > Lisp is actually =E2=80=98cl-case=E2=80=99, which has a second-class citi= zen > feel. Exactly. And there is no need for that second-class status. And it is _new_. In the past everyone just used `case' in Emacs. And they still can, the same way, by loading `cl.el' at byte-compile time, to pick up the macro. They should not need to do that. > In using =E2=80=98cl-case=E2=80=99 as one of the conceptual parents of = =E2=80=98pcase=E2=80=99,=20 But it's not, really. Maybe "parent" in the sense of design ancestor, but not "parent" in the sense of current derivation or resemblance. > - Build on "expectatious programmer" mindset. Programmers new > to Emacs Lisp might feel that same surprise i felt and do what > i did: reach for =E2=80=98cl-case=E2=80=99 immediately, making it a hab= it to > such an extent as to consider it intrinsic (thus, familiar). Yes.