From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#39557: 27.0.60; Elisp manual, doc about bignums Date: Tue, 11 Feb 2020 19:01:51 +0200 Message-ID: <8336bhrrb4.fsf@gnu.org> References: <3d420026-bb32-413f-9a9c-304240aa82e2@default> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="103245"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 39557@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 11 18:04:34 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 1j1Yxd-000QiC-H1 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Feb 2020 18:04:33 +0100 Original-Received: from localhost ([::1]:53576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1Yxc-00079z-5l for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Feb 2020 12:04:32 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45866) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1YwB-0005eY-6E for bug-gnu-emacs@gnu.org; Tue, 11 Feb 2020 12:03:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1YwA-0000zg-4o for bug-gnu-emacs@gnu.org; Tue, 11 Feb 2020 12:03:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51451) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j1Yw9-0000yU-Ud for bug-gnu-emacs@gnu.org; Tue, 11 Feb 2020 12:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j1Yw9-0005EU-Og for bug-gnu-emacs@gnu.org; Tue, 11 Feb 2020 12:03:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Feb 2020 17:03: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.158144052320043 (code B ref 39557); Tue, 11 Feb 2020 17:03:01 +0000 Original-Received: (at 39557) by debbugs.gnu.org; 11 Feb 2020 17:02:03 +0000 Original-Received: from localhost ([127.0.0.1]:57424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1YvC-0005DD-TU for submit@debbugs.gnu.org; Tue, 11 Feb 2020 12:02:03 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1YvB-0005Ch-8t for 39557@debbugs.gnu.org; Tue, 11 Feb 2020 12:02:01 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j1Yv5-0007sW-9i; Tue, 11 Feb 2020 12:01:55 -0500 Original-Received: from [176.228.60.248] (port=3378 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j1Yv4-0008Vc-HQ; Tue, 11 Feb 2020 12:01:54 -0500 In-reply-to: <3d420026-bb32-413f-9a9c-304240aa82e2@default> (message from Drew Adams on Mon, 10 Feb 2020 15:55:03 -0800 (PST)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:175945 Archived-At: > Date: Mon, 10 Feb 2020 15:55:03 -0800 (PST) > From: Drew Adams > > Some functions in Emacs accept only fixnums. Also, while fixnums can > always be compared for numeric equality with 'eq', bignums require > more-heavyweight equality predicates like 'eql'." > > That's really the _last_ thing we should tell users, not the first. > > And even if we tell them something like that we should NOT emphasize > using `eq' ("bignums _require_..."). We should NOT give users the > impression that they should want to avoid the "more-heavyweight" > comparison function `eql'. > > We should instead tell users, right away, that they can (and typically > should) use `eql' for comparing any integers, regardless of whether they > happen, on this or that platform/machine, to be fixnums or bignums. > > I'm really surprised this doc got inserted as it is. > > Using `eq' is only an optimisation; it's platform/machine-specific; and > it makes users worry about whether the numbers being compared are both > fixnums. (Sure, they can always test first with `fixnump' or `bignump', > but still...) > > And I don't see where the doc tells you how the Lisp reader treats an > integer numeral - when it gives you a fixnum and when it gives you a > bignum. Shouldn't it tell you that you get a fixnum whenever the value > is within the fixnum range (if that's in fact the case)? I mean, if > you're going to be comparing against a literal value, and the doc slants > you toward using `eq' as it does, you'll at least want to know whether > some numeral ends up as a fixnum or a bignum. (Sure, you can always > test it...) There seems to be a contradiction here: where we do describe the difference between fixnums and bignums, you argue that we shouldn't, but then you pick up a place where we don't distinguish between them, and you argue that we should...