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: Thu, 13 Feb 2020 13:03:46 -0800 (PST) Message-ID: <2cf08bc2-be80-4943-9e1c-20a4b594950c@default> References: <3d420026-bb32-413f-9a9c-304240aa82e2@default> <8336bhrrb4.fsf@gnu.org> <85sgjgyeya.fsf@gmail.com> <7f19329d-6d7e-40e1-9c5c-ef6b58e25a62@default> <85imkbyf88.fsf@gmail.com> <5fe049c8-18b5-4941-9e34-c320500f49d2@default> <85ftfexs5s.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="13590"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 39557@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 13 22:04:15 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 1j2Leg-0003O4-6v for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Feb 2020 22:04:14 +0100 Original-Received: from localhost ([::1]:59120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2Lee-00023Z-Jq for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Feb 2020 16:04:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39265) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2LeV-00023P-RF for bug-gnu-emacs@gnu.org; Thu, 13 Feb 2020 16:04:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2LeU-0006vz-Lh for bug-gnu-emacs@gnu.org; Thu, 13 Feb 2020 16:04:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54561) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2LeU-0006vd-HU for bug-gnu-emacs@gnu.org; Thu, 13 Feb 2020 16:04:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j2LeU-0003MJ-CX for bug-gnu-emacs@gnu.org; Thu, 13 Feb 2020 16:04:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Feb 2020 21:04:02 +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.158162783812902 (code B ref 39557); Thu, 13 Feb 2020 21:04:02 +0000 Original-Received: (at 39557) by debbugs.gnu.org; 13 Feb 2020 21:03:58 +0000 Original-Received: from localhost ([127.0.0.1]:60534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2LeQ-0003M0-Dw for submit@debbugs.gnu.org; Thu, 13 Feb 2020 16:03:58 -0500 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:37152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2LeM-0003Lm-Ik for 39557@debbugs.gnu.org; Thu, 13 Feb 2020 16:03:55 -0500 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01DL2lCp134797; Thu, 13 Feb 2020 21:03:48 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=+gmMPCVFHcPCEP6Az7fg59SqBJJKfIGNEtisP/93pU8=; b=iktLC9LzSPIArHksoqZzD0Lw9q2lcQbHlQnXjUuxznTiR6pNjPHAbR4kLXVun/3JTVWv h3z0GuSkj2ADuGHZQxRb9uScd7SByA4yytrUWdJfyJi8a35OSiTU4j1mO2offEZFQsFb MY+ATPk02MgfS7Y5Z3J1lIxpponojwqy256E0rC8p+gcFTRR+o4bRRy/YhrM6L4piJwh 5MC7izpSbUs4uWrdGA2SkGiZ2HMQ+muAtKbvmv/k3eLorqZUj1X+7MCua6uS2oti708T zlfdSWyZTG31v0bkX6kNDVjPbmEV29rukyLQCSx2GBotoUIVBn4DqAgW/9O2FxcSGwnH hA== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 2y2jx6nf3w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 13 Feb 2020 21:03:48 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01DL3Mna069065; Thu, 13 Feb 2020 21:03:47 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 2y5dtf8p8s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 13 Feb 2020 21:03:47 +0000 Original-Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 01DL3kmA017154; Thu, 13 Feb 2020 21:03:47 GMT In-Reply-To: <85ftfexs5s.fsf@gmail.com> 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=9530 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 phishscore=0 mlxscore=0 adultscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002130150 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9530 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 malwarescore=0 priorityscore=1501 adultscore=0 phishscore=0 impostorscore=0 spamscore=0 bulkscore=0 lowpriorityscore=0 mlxscore=0 suspectscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002130150 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:176019 Archived-At: > > to the technical content - the problem > > reported? Any thoughts on that? >=20 > The idea is recommend using eql for comparing integers first, and move > the description of eq and fixnum/bignum distinction to the next > paragraph, right? Almost. Recommend `eql' generally for integers, even as, i.e., even _after_, pointing out that integers are either fixnums or bignums. IOW, it's a general recommendation, regardless of the fact that there are two kinds of integers. And in fact point out that you CANNOT use `eq', in general, to compare integers. That's part of the point about recommending `eql'. The recommendation is in spite of the fact that there are two kinds of integers - it applies to integers of both kinds, and `eq' cannot be used with integers of both kinds. And somewhere after that (whether the next paragraph or not), get into the fact that you can use `eq' (in addition to `eql') to compare two fixnums (BOTH must be known to be fixnums) - IF you think it's important to point that out. I think it's important to point out that you can _distinguish_ a fixnum from a bignum, and how to do that. But I can't say whether it's really important, in this doc, to say that you can compare two fixnums using `eq'. A priori, I'd think not. As I said earlier, AFAIK that's only an optimization, and anyone who is liable to use/need such optimizing should already know that `eq' is faster than `eql'. I don't think that _this_ doc needs to or should point out that `eql' is "more-heavyweight" than `eq'. That's not specific to integer comparison. To be clear, I have no objection to saying that you can use `eq' for two fixnums. I'm just not aware of why it's important to do that in this doc. > And also to document when the reader returns fixnums or bignums. Though > I guess that might instead be solved by making the rule you cited > stronger to something like: >=20 > Emacs always represents integers in fixnum range > as a fixnum, not a bignum. >=20 > (Assuming that's true, which I believe it is) Yes, that would be OK, provided we don't speak of "computing" the integer, which can be misleading for a literal (a numeral), or provided we make clear that that rule applies also to numerals. Thanks for working on this fix, if you do.