Subject: Re: [External] : bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`

From: Stefan Monnier <[email-masked]>
Date: Sun, 25 Apr 2021 09:52:45 -0400

> Read what I said about _real_ functions, which is whose
> equality is undecidable.

`add/remove-hook` sadly lives in the real world.

> As contrasted with the equality of Lisp "functions", represented as
> symbols, strings, or lambda forms.

Strings aren't used to represent functions in Lisp, and the case of
lambda-forms is the case that's actually causing real performance
problems in add/remove-hook (both interpreted and compiled).

So, yes, symbols is the only option remaining, to enforce the `eq`
semantics which seems to be at least as often what we want and doesn't
suffer from performance problems.

> The latter is certainly decidable, and it's what we use in
> `remove-hook' to decide.

My comment about decidability was just a side remark that doesn't really
matter for this decision.  I now regret mentioning it.

        Stefan