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#24353: 25.1.1: looking-back wrong info Date: Fri, 2 Sep 2016 16:59:30 -0700 (PDT) Message-ID: References: <83lgzael08.fsf@gnu.org> <83k2euehyc.fsf@gnu.org> <1a485a01-87cd-db03-4a0b-2e9033754c46@yandex.ru> 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 1472860821 12181 195.159.176.226 (3 Sep 2016 00:00:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 3 Sep 2016 00:00:21 +0000 (UTC) Cc: 24353@debbugs.gnu.org To: Dmitry Gutov , Eli Zaretskii , Andreas =?UTF-8?Q?R=C3=B6hler?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 03 02:00:17 2016 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 1bfyNb-0002OB-Ql for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Sep 2016 02:00:16 +0200 Original-Received: from localhost ([::1]:44426 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfyNZ-0005iL-Ho for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Sep 2016 20:00:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfyNT-0005hZ-Jh for bug-gnu-emacs@gnu.org; Fri, 02 Sep 2016 20:00:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfyNO-0007bh-OW for bug-gnu-emacs@gnu.org; Fri, 02 Sep 2016 20:00:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfyNO-0007ay-Ly for bug-gnu-emacs@gnu.org; Fri, 02 Sep 2016 20:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bfyNO-0005FI-Cv for bug-gnu-emacs@gnu.org; Fri, 02 Sep 2016 20:00: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, 03 Sep 2016 00:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24353 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix notabug Original-Received: via spool by 24353-submit@debbugs.gnu.org id=B24353.147286078320113 (code B ref 24353); Sat, 03 Sep 2016 00:00:02 +0000 Original-Received: (at 24353) by debbugs.gnu.org; 2 Sep 2016 23:59:43 +0000 Original-Received: from localhost ([127.0.0.1]:48086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bfyN4-0005EL-Ko for submit@debbugs.gnu.org; Fri, 02 Sep 2016 19:59:42 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:33138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bfyN3-0005E7-6V for 24353@debbugs.gnu.org; Fri, 02 Sep 2016 19:59:41 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u82NxYEw024896 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 2 Sep 2016 23:59:34 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id u82NxYgW001758 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 2 Sep 2016 23:59:34 GMT Original-Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u82NxVMk009563; Fri, 2 Sep 2016 23:59:32 GMT In-Reply-To: <1a485a01-87cd-db03-4a0b-2e9033754c46@yandex.ru> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6753.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] 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:122869 Archived-At: > > How does this change help Emacs users? >=20 > It forces Emacs Lisp programmers to include the last argument, It certainly does not. It does NOT force anything. It only misleads. It doesn't even explicitly recommend. > thus making their code likely faster. Users like faster programs. The right way to _encourage_ programmers to use it is to tell them precisely that: "Using LIMIT is recommended - it typically results in faster code." Or "strongly recommended". Or "You're nuts if you omit LIMIT!" Or whatever other positive or negative encouragement you think might be most effective and appropriate. Telling them nothing about this and, instead, just showing a false signature, does NOT help them. > > If it is so important that people provide LIMIT then spell > > that out _explicitly_ in the doc as a recommendation. >=20 > That's very easy to miss. It's nowhere near as easy to miss as just moving LIMIT before &optional in the printed (and false) signature. Anyone getting super serious about the function, and interested beyond the doc string, will look at the code, and will conclude that the signature in the doc string must by a typo (erroneous). And erroneous it is. An explicit recommendation is quite effective. It can be as strong and as noticeable as you like, or as gentle and quiet as you like. > And like Eli said, the choice was between this and > _actually_ changing the signature. No, that was not the only choice. The desired change is (apparently) to pass a strong recommendation message, in order to affect programmer behavior. That doesn't happen just by faking a signature. If you want to change behavior, let programmers know that - explicitly. Telling them the (positive) effect of LIMIT is the best way to get them to use it. > I imagine you would like the latter choice even less. It doesn't really affect me, personally. But yes, that would be quite unwise, for Emacs users and code generally. If it aint broke, don't fix it. Is it _sufficiently important_ that code uses LIMIT that you need to break backward compatibility? If so, then you have no choice but to break it. But that is the question. > > It should be a no-no to just change the advertized > > signature of a function, without changing the actual > > signature (code) and without otherwise changing the doc. >=20 > You have some point there, but mentioning the last argument in the > docstring would be rather awkward, considering it's absent in the > advertised signature. Sorry, but I have no idea what you mean by that. This doc-string change seems doubly bad, in fact: 1. The signature that is shown is false. 2. We removed this sentence, which was the only suggestion related to performance: "As a general recommendation, try to avoid using `looking-back' wherever possible, since it is slow." If that vague recommendation is not accurate or is not strong enough, then replace it with a more accurate or stronger one. But don't just say NOTHING about performance and NOTHING about the effect of LIMIT on performance, if that's what this is really all about. Programmers and other users are not dumb "losers". They are smart enough to understand what you have to say to them about LIMIT. Just say it - explicitly.