GNU bug report logs -
#47992
27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`
Previous Next
Reported by: Daniel Mendler <mail <at> daniel-mendler.de>
Date: Sat, 24 Apr 2021 12:12:01 UTC
Severity: normal
Tags: fixed
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #47 received at 47992 <at> debbugs.gnu.org (full text, mbox):
> Drew, what does this rant have to do with add-hook?
> Please stay focused.
Please read what I wrote. I see no rant.
> The only relevant thing I saw in there was:
>
> >> Equality on functions is fundamentally undecidable [...]
> >
> > 100% agreement. And there's no need for it, for Emacs.
>
> Huh, without it, there's no `remove-hook`.
Read what I said about _real_ functions, which is whose
equality is undecidable. As contrasted with the equality
of Lisp "functions", represented as symbols, strings, or
lambda forms. The latter is certainly decidable, and
it's what we use in `remove-hook' to decide.
"Of course, real functions don't have structure, and real
function equality is altogether problematic. But this
is Lisp, and some Lisp representations of "functions",
at least when interpreted, do have structure (list,
string, vector)."
I agreed that equality on functions is undecidable.
I added that (fortunately) we can get by with a lesser
test of just our simple representations of functions.
We can and we do.
Our use of `equal' in `remove-hook' to test Lisp
"function" equality has nothing to do with the
undecidability of (real) function equality. There's
no need, in Emacs, for "equality on functions", which
"is fundamentally undecidable".
This bug report was last modified 3 years and 323 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.