From: Lars Ingebrigtsen <larsi@gnus.org>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: 56255@debbugs.gnu.org
Subject: bug#56255: 28.1.50; sxhash-equal does not change when object is modified
Date: Tue, 28 Jun 2022 01:00:33 +0200 [thread overview]
Message-ID: <87r139u2y6.fsf@gnus.org> (raw)
In-Reply-To: <87y1xhu34f.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 28 Jun 2022 00:56:48 +0200")
Lars Ingebrigtsen <larsi@gnus.org> writes:
> So I think the doc string overstates things.
>
> --
> If (equal A B), then (= (sxhash-equal A) (sxhash-equal B)).
> --
>
> Is not remotely true, but:
>
> --
> If (= (sxhash-equal A) (sxhash-equal B)) then it's quite likely that
> (equal A B), but the opposite is not true for deeply nested structures.
> --
Sorry, that's all wrong, and what the doc string says is true. That is,
if they're equal, then the hash is =.
But (= (sxhash-equal A) (sxhash-equal B)) does not imply that
(equal A B), and the doc string should say that explicitly.
It's the manual that's wrong here:
If the two objects are not ‘equal’, the values returned by
‘sxhash-equal’ are usually different, but not always; once in a
rare while, by luck, you will encounter two distinct-looking
objects that give the same result from ‘sxhash-equal’.
It's not "once in a rare while" for deeply nested structures.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2022-06-27 23:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-27 12:27 bug#56255: 28.1.50; sxhash-equal does not change when object is modified Ihor Radchenko
2022-06-27 22:56 ` Lars Ingebrigtsen
2022-06-27 23:00 ` Lars Ingebrigtsen [this message]
2022-06-28 12:58 ` Lars Ingebrigtsen
2022-06-29 1:58 ` Ihor Radchenko
2022-06-29 10:01 ` Lars Ingebrigtsen
2022-06-29 10:12 ` Ihor Radchenko
2022-06-29 10:15 ` Lars Ingebrigtsen
2022-06-29 12:33 ` Ihor Radchenko
2022-06-29 12:38 ` Lars Ingebrigtsen
2022-06-29 12:56 ` Ihor Radchenko
2022-06-30 9:06 ` Lars Ingebrigtsen
2022-06-30 11:16 ` Ihor Radchenko
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r139u2y6.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=56255@debbugs.gnu.org \
--cc=yantar92@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).