unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattias.engdegard@gmail.com>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: Mekeor Melire <mekeor@posteo.de>, john muhl <jm@pub.pink>,
	68668@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>,
	Andrea Corallo <acorallo@gnu.org>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#68668: 30.0.50; Invalid hash table test: tab-bar--auto-width-hash-test
Date: Wed, 31 Jan 2024 15:17:33 +0100	[thread overview]
Message-ID: <96DABAA1-E447-4627-AF4D-81D78B7DA81B@gmail.com> (raw)
In-Reply-To: <m2v879aao3.fsf@Pro.fritz.box>

31 jan. 2024 kl. 14.34 skrev Gerd Möllmann <gerd.moellmann@gmail.com>:

> 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.

This is how elisp hash tables worked in Emacs 29; I didn't change that part, I think.

> 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.

I'm not really happy with that sort of spooky action at a distance because it makes it too easy not only to introduce mysterious behaviour but also violate invariants that the C implementation relies upon for the management of an internal data structure.

That said, it is true that Lisp permits retroactive dynamism in several places even with the current design: the test and hash functions can both be redefined, and of course all code in Lisp is potentially impure and can change behaviour when its environment changes.

I still believe the current semantics cause fewer user headaches on balance. In any case, it probably should be documented in the `define-hash-table-test` doc string.

But you do raise an interesting point, thank you!






  reply	other threads:[~2024-01-31 14:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23  3:46 bug#68668: 30.0.50; Invalid hash table test: tab-bar--auto-width-hash-test No Wayman
2024-01-23  7:06 ` Juri Linkov
2024-01-24  7:50   ` Juri Linkov
2024-01-24  8:05     ` iarchivedmywholelife
2024-01-24 13:46     ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-24 17:02       ` Juri Linkov
2024-01-25  8:40       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-25 17:44         ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-29 22:53 ` Mekeor Melire
2024-01-30 12:22   ` Eli Zaretskii
2024-01-30 14:55     ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-30 21:52       ` Andrea Corallo
2024-01-31  9:56         ` Andrea Corallo
2024-01-31 10:13           ` Andrea Corallo
2024-01-31 10:29             ` Gerd Möllmann
2024-01-31 11:55               ` Mattias Engdegård
2024-01-31 13:05                 ` Gerd Möllmann
2024-01-31 13:18                   ` Mattias Engdegård
2024-01-31 13:34                     ` Gerd Möllmann
2024-01-31 14:17                       ` Mattias Engdegård [this message]
2024-01-31 14:44                         ` Gerd Möllmann
2024-01-31 15:05                           ` Eli Zaretskii
2024-01-31 15:14                             ` bug#68821: Native compile error when activating rectangle-mark-mode Gerd Möllmann

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=96DABAA1-E447-4627-AF4D-81D78B7DA81B@gmail.com \
    --to=mattias.engdegard@gmail.com \
    --cc=68668@debbugs.gnu.org \
    --cc=acorallo@gnu.org \
    --cc=eliz@gnu.org \
    --cc=gerd.moellmann@gmail.com \
    --cc=jm@pub.pink \
    --cc=mekeor@posteo.de \
    --cc=monnier@iro.umontreal.ca \
    /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).