all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>, Drew Adams <drew.adams@oracle.com>
Cc: 39557@debbugs.gnu.org
Subject: bug#39557: 27.0.60; Elisp manual, doc about bignums
Date: Tue, 11 Feb 2020 10:26:08 -0800 (PST)	[thread overview]
Message-ID: <77485d0f-28cc-46a1-a459-34e6fef7083a@default> (raw)
In-Reply-To: <<8336bhrrb4.fsf@gnu.org>>

> >   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...

Maybe read again what I wrote.

I didn't say we should not describe the
difference between the two.  Not at all.





       reply	other threads:[~2020-02-11 18:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<3d420026-bb32-413f-9a9c-304240aa82e2@default>
     [not found] ` <<8336bhrrb4.fsf@gnu.org>
2020-02-11 18:26   ` Drew Adams [this message]
2020-02-11 19:14     ` bug#39557: 27.0.60; Elisp manual, doc about bignums Eli Zaretskii
2020-02-10 23:55 Drew Adams
2020-02-11 17:01 ` Eli Zaretskii
2020-02-11 21:46   ` Noam Postavsky
2020-02-11 22:34     ` Drew Adams
2020-02-12 15:53       ` Noam Postavsky
2020-02-12 21:36         ` Drew Adams
2020-02-13 18:23           ` Noam Postavsky
2020-02-13 21:03             ` Drew Adams
2020-02-12 20:06     ` Richard Stallman
2020-02-13 23:43     ` Richard Stallman
2020-02-17 22:05 ` Paul Eggert
2020-02-17 23:19   ` Drew Adams
2020-02-17 23:52     ` Paul Eggert
2020-02-18  1:52       ` Drew Adams
2020-02-18  3:13         ` Paul Eggert
2020-09-25 11:18           ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=77485d0f-28cc-46a1-a459-34e6fef7083a@default \
    --to=drew.adams@oracle.com \
    --cc=39557@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.