From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#39557: 27.0.60; Elisp manual, doc about bignums Date: Mon, 17 Feb 2020 17:52:41 -0800 (PST) Message-ID: <9da8663c-083e-4d3f-a706-26744feac1f0@default> References: <8c6ed478-db97-8abc-de79-f5c10498ad0c@cs.ucla.edu> <216cb392-3b01-466d-8fa2-eabcba3283cd@default> <8deb3c37-79a4-b10f-87ed-6265dedb07d7@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="98312"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Noam Postavsky , 39557@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 18 02:53:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j3s4V-000PSA-4V for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Feb 2020 02:53:11 +0100 Original-Received: from localhost ([::1]:55642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3s4U-0000tc-7c for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 17 Feb 2020 20:53:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51703) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3s4M-0000q8-W5 for bug-gnu-emacs@gnu.org; Mon, 17 Feb 2020 20:53:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3s4L-0001Z1-Rh for bug-gnu-emacs@gnu.org; Mon, 17 Feb 2020 20:53:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33437) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j3s4L-0001Yt-O6 for bug-gnu-emacs@gnu.org; Mon, 17 Feb 2020 20:53:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j3s4L-0005JZ-Mm for bug-gnu-emacs@gnu.org; Mon, 17 Feb 2020 20:53:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Feb 2020 01:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39557 X-GNU-PR-Package: emacs Original-Received: via spool by 39557-submit@debbugs.gnu.org id=B39557.158199078120422 (code B ref 39557); Tue, 18 Feb 2020 01:53:01 +0000 Original-Received: (at 39557) by debbugs.gnu.org; 18 Feb 2020 01:53:01 +0000 Original-Received: from localhost ([127.0.0.1]:39410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3s4K-0005JK-MU for submit@debbugs.gnu.org; Mon, 17 Feb 2020 20:53:00 -0500 Original-Received: from userp2120.oracle.com ([156.151.31.85]:51002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3s4I-0005J7-Ht for 39557@debbugs.gnu.org; Mon, 17 Feb 2020 20:52:59 -0500 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01I1jUdE139072; Tue, 18 Feb 2020 01:52:45 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-2020-01-29; bh=CWRMUHvXpYPi7zV+SQGnmdsk3dVmqGbVmoDvkg/N7Lw=; b=jBQjDYUgGrd1zTUqKnsaJ4D4GpbQNZ1qarzSfSMOoPBsQmb5BWUo4z2CaF091SEqi9hU 1Kn3+DkKKROXcWKYMJavsUCXgK5ILR4eqjaC1dhEs0tTuA5Kf19BmQpvi3fp5poZUS4Z h99MIXA8k7qEZaV0+Qu525Xcz8f6w7a5B1WEPw0n1BnlxfY8v/AbLyWrQ0XVlQRXcnpu 3EcU+CR2h2F9B2GSYvLOA9DNj4JV6zsmNW87RZlqAkounA2WkkTEP4X5/jV3ne4A5KIQ YWygswHu9u2S17AS8PYLbmD5VF1EPV0e5gFnYRza1rqy7KzpCXfUHcFzvSuzmuQMYBIK 9g== Original-Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 2y699rjksj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Feb 2020 01:52:44 +0000 Original-Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01I1pmIG036149; Tue, 18 Feb 2020 01:52:44 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3020.oracle.com with ESMTP id 2y6ten0yne-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Feb 2020 01:52:43 +0000 Original-Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 01I1qgwp011924; Tue, 18 Feb 2020 01:52:42 GMT In-Reply-To: <8deb3c37-79a4-b10f-87ed-6265dedb07d7@cs.ucla.edu> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4954.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9534 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 phishscore=0 bulkscore=0 suspectscore=0 mlxscore=0 mlxlogscore=996 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002180012 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9534 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 malwarescore=0 priorityscore=1501 adultscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 lowpriorityscore=0 spamscore=0 clxscore=1015 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002180011 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: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:176176 Archived-At: > >> No, it suffices if *either* is a fixnum. For example, (eq 0 FOO) tests > >> whether > >> FOO is the integer zero, and works regardless of whether FOO is a bign= um. > > > > I see. Then please say that. >=20 > I'd rather not. Again, this section is "Integer Basics" and the reference > manual > should not bog itself down various possible ways to use integers in progr= ams > (there are too many ways). Then remove all mention of `eq', if you don't specify how it behaves with bignums. > > If we're going to talk about "older" code then > > we should specify older than what. >=20 > I originally wrote "older than Emacs 27" but trimmed it as being > nonessential > before installing the patch. It's not a big deal either way. If it means nothing to say "older code" then remove it altogether. The hand waving just confuses. > > I don't > > think there should be any need to talk about > > older code or say "should now". >=20 > This bug report assumed that Emacs is basically like Common Lisp in this > area. No, it doesn't. Whatever Emacs Lisp users need to know about integers is what they should be told. If they need to be told something about `eq' then tell that. > However, Emacs is not there yet (though we've made progress), and it's > better if > the documentation reflects that fact rather than pretending there's no > difference from Common Lisp. AFAIK, I didn't say anything that contradicts that. I'd never suggest that Emacs Lisp doc pretend that Emacs Lisp is the same as Common Lisp where it's not. I mentioned CL because its doc is clear wrt the use of `eql' for numbers. If the Emacs doc can't say the same thing, that's fine; it should say what it needs to say, to make clear its own behavior. It shouldn't waffle or confuse users. > > Any code - > > old or new - that uses `eq' to compare > > integers needs to know that at least one of > > the operands is a fixnum. >=20 > It's sometimes OK to use eq even when both arguments are bignums. It depe= nds > on the circumstances. Either it's important to say how `eq' behaves with bignums or it's not. =20 If it is, then users deserve the straight info. If it's not, why talk about `eq' at all? In that case, why not just tell users to compare integers using `eql' or `=3D'? You seem to be trying to have your cake and eat it too. You seem to want to talk about `eq' in the context of integers, but you apparently don't want to say how it behaves. I don't see how that helps users. My suggestion is to either (1) really say what the deal is with `eq' wrt integers (but not as the first thing we say about integers - you've already moved it, which is good) or (2) say nothing about it, other than to recommend against using it and for using `eql'. Figure out what the real message is for users, about using `eq' with integers - what they should be told. Then communicate it.