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

Björn A. Lindqvist <[email protected]>
Newsgroups gmane.emacs.devel
Message-ID <[email protected]>
On 8/14/26 13:13, Sean Whitton wrote:
> I think we'd really like to see examples.  I don't think I have ever
> done it so I have a hard time believing "extremely"

Suppose you have same JSON configuration. The most natural
representation of it is a list of hash tables that contain nested hash
tables and lists. You perform some expensive operation only if the
configuration changes:

(when (not (equal old-config new-config))
   (expensive-op))

The configuration may be a parse tree, key-value store, or any other
kind of database for which nested hash tables is a convenient
representation.

>> To the best of my knowledge, there is not a single programming
>> language which distinguishes between equality and identity created
>> since Java that does not support comparing hash tables for
>> equality.
> 
> Looks like Python has it.  Perl doesn't.

Perl is ancient. My point is that if everyone is doing X and you are 
doing Y, it may be worth considering whether you also should do X 
instead of Y.

-- 
mvh Björn Lindqvist
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.