From: Ihor Radchenko <yantar92@gmail.com>
To: emacs-devel@gnu.org
Subject: Comparing hash table objects
Date: Wed, 08 Jun 2022 16:41:47 +0800 [thread overview]
Message-ID: <871qvz4kdw.fsf@localhost> (raw)
Hello,
Is there any way to compare objects containing hash tables for equality?
I have a struct that is created like
(list 'type (make-hash-table))
With hash table later populated with some key:value pairs.
I expect two structs like the above to be comparable via equal:
(equal (list 'type (make-hash-table)) (list 'type (make-hash-table))) ;; => t
However, running the above code gives nil.
Is the above behavior intentional?
Best,
Ihor
next reply other threads:[~2022-06-08 8:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87wn1axgh6.fsf@breatheoutbreathe.in>
[not found] ` <83jzx925lv.fsf@gnu.org>
[not found] ` <87a5xubwoo.fsf@breatheoutbreathe.in>
[not found] ` <87v8csku60.fsf@breatheoutbreathe.in>
[not found] ` <83cyyz94c6.fsf@gnu.org>
[not found] ` <87a5u2ydzg.fsf@breatheoutbreathe.in>
[not found] ` <83msy25g0s.fsf@gnu.org>
[not found] ` <624CBB7F-1442-400D-8D4D-1B26EBE9DACB@breatheoutbreathe.in>
[not found] ` <jwvr0ndq3b8.fsf-monnier+emacs@gnu.org>
[not found] ` <877cp5bmig.fsf@breatheoutbreathe.in>
[not found] ` <jwvtts8ib4b.fsf-monnier+emacs@gnu.org>
2022-06-08 8:41 ` Ihor Radchenko [this message]
2022-06-08 8:51 ` Comparing hash table objects Andreas Schwab
2022-06-08 9:17 ` Ihor Radchenko
2022-06-10 22:45 ` Richard Stallman
2022-06-11 5:52 ` Ihor Radchenko
2022-06-11 16:04 ` Stefan Monnier
2022-06-12 9:16 ` Ihor Radchenko
2022-06-12 23:55 ` Sam Steingold
2022-06-13 13:02 ` Stefan Monnier
2022-06-13 16:18 ` Sam Steingold
[not found] ` <8734zoaolv.fsf@localhost>
[not found] ` <jwv1qf8iqua.fsf-monnier+emacs@gnu.org>
[not found] ` <87fs3o8uil.fsf@localhost>
[not found] ` <87msxwa8kd.fsf@breatheoutbreathe.in>
[not found] ` <87il8j7ji9.fsf@localhost>
[not found] ` <80479897-500e-fe60-6586-0a44ccb5993b@daniel-mendler.de>
[not found] ` <877coz7f6h.fsf@localhost>
[not found] ` <86d6e412-9e5b-9086-56ce-e3794085096a@daniel-mendler.de>
2023-09-09 12:12 ` compat.el and Emacs unstable master branch features (was: bug#63513: [PATCH] Make persist-defvar work with records and hash tables) Ihor Radchenko
2023-09-09 12:29 ` Daniel Mendler
2023-09-09 16:52 ` Joseph Turner
2023-09-11 8:45 ` Ihor Radchenko
2023-09-12 10:02 ` compat.el and Emacs unstable master branch features Philip Kaludercic
2023-09-12 10:27 ` Daniel Mendler
2023-09-13 10:31 ` Philip Kaludercic
2023-09-13 17:11 ` Daniel Mendler
2023-10-15 8:43 ` Ihor Radchenko
2023-10-15 12:09 ` Philip Kaludercic
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=871qvz4kdw.fsf@localhost \
--to=yantar92@gmail.com \
--cc=emacs-devel@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 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).