unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: rms@gnu.org,  schwab@suse.de,  emacs-devel@gnu.org
Subject: Re: Comparing hash table objects
Date: Sun, 12 Jun 2022 17:16:36 +0800	[thread overview]
Message-ID: <87zgiip7gr.fsf@localhost> (raw)
In-Reply-To: <jwvv8t7chvr.fsf-monnier+emacs@gnu.org>

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> However, it will not help with the problem of comparing objects
>> containing hash tables. Unless those obejcts also define special
>> comparison function (which is inconvenient).
>
> This is an instance of a fairly general problem with Lisp's equality
> tests (and it's not really specific to Lisp, admittedly).
>
> Maybe a half-sane way to solve this problem is to provide a generic
> "equality driver" which takes an argument specifying which objects to
> compare for structural equality (i.e. where to keep recursing).

This might be an option.
It would then help if cl-defstruct supported a default comparator
setting the "equality driver" to be used by default when comparing the
objects using equal.

Best,
Ihor



  reply	other threads:[~2022-06-12  9:16 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                     ` Comparing hash table objects Ihor Radchenko
2022-06-08  8:51                       ` 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 [this message]
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=87zgiip7gr.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@gnu.org \
    --cc=schwab@suse.de \
    /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).