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

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

bug#47992: [External] : bug#47992: 27; 28; Phase out use of `equal` in `


From: Drew Adams
Subject: bug#47992: [External] : bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`
Date: Sun, 25 Apr 2021 04:57:07 +0000

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





reply via email to

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