Re: [PATCH] Implement `equal' for hash tables

Stéphane Marks <[email protected]>
Newsgroups gmane.emacs.devel
Message-ID <CAN+1HbpnzQKbM2ep2mEXF4XkGkXj=M0MPgQ+VKu86Vfd+E3mHw@mail.gmail.com>
On Sun, Aug 16, 2026 at 11:55 AM Stefan Monnier <[email protected]>
wrote:

> > Stefan, what do you think of this?
>
> Nothing specific.  For the record, if I were to define `equal` today,
> I'd make hash-tables compare structurally, both because that's what
> Common Lisp does, and because my rule of thumb is that if it can be
> printed `read`ably it should usually be compared structurally.
>
> [ And of course, the order in which the keys were inserted should not
>   influence the comparison.  ]
>
> As I said earlier, the issue for me is backward compatibility.
> [ As well as the desire to find a more general solution where the
>   caller can specify what is compared structurally and what isn't.  ]
>

And perhaps some custom comparator logic to handle things like json
dates/times and the rest of the under-and un-specified mess that passes for
some data-interchange formats/protocols.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.