bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#68668: 30.0.50; Invalid hash table test: tab-bar--auto-width-hash-te


From: Gerd Möllmann
Subject: bug#68668: 30.0.50; Invalid hash table test: tab-bar--auto-width-hash-test
Date: Wed, 31 Jan 2024 14:34:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Mattias Engdegård <mattias.engdegard@gmail.com> writes:

> 31 jan. 2024 kl. 14.05 skrev Gerd Möllmann <gerd.moellmann@gmail.com>:
>
>> why not reuse an existing entry for a given name?
>
> We mustn't violate invariants of existing hash-table objects when the
> test is redefined. Consider:
>
> (define-hash-table-test 'mytest #'cmp1 #'hash1)
> (setq h (make-hash-table :test 'mytest))
> ...
> (define-hash-table-test 'mytest #'cmp2 #'hash2)
> ; h must still use cmp1 and hash1 at this point

But that also means that we end up with two sorts of hash-tables that
behave differently, without us being able to tell them apart, because
hash-table-test returns 'mytest for both. I think I'd prefer if that
were not the case, and the redefinition would apply to both. If an old
hash-table then behaves stragely, I know what's up, and can empty it, if
it isn't still empty in the first place.

Just my 2 cents.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]