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

From: Drew Adams <[email-masked]>
Date: Sun, 25 Apr 2021 04:57:35 +0000

>> > > you'd make it no longer work at all for
>> > > interpreted lambda forms (except rare cases where they
>> > > might actually be `eq' - e.g., same list structure)?
>> > 
>> > It would still work for lambda forms, just differently (arguably,
>> > in a way that's more often right than the current way).
> >
> > Please elaborate.  Comparing lambda forms using `eq'?
> > Not clear to me how that works in the general case.
> >
> >  (eq (lambda () foo) (lambda () foo)) ?
> >
> > I don't see that it works at all, let alone works more
> > often than the current way:
> >  (equal (lambda () foo) (lambda () foo))
> 
> IOW, you don't have an opinion either way on the 
> proposed change of semantics.

Seems to be your favorite way of (not) communicating:
saying that I have nothing to say.

How about actually elaborating: Tell us how using
`eq' would enable the interpreter to test equality
of lambda forms in the general case (not shared list
structure)?

How would using `eq' "still work for lambda forms,
just differently (arguably, in a way that's more
often right than the current way)"?  Forgive me for
not understanding what you mean by that.
___

As for my opinion on the proposed change: I haven't
seen a good argument for using `eq' instead of `equal'
to test for equality in `add|remove-hook' (in the code:
`memq' instead of `member').

I gave good arguments for continuing to use `equal'.
Emacs users use the Elisp interpreter interactively,
and they do use lambda forms with `add|remove-hook',
even though that's not a great idea.  `eq' doesn't
cut the mustard at all, for such use.

Barring a good argument for using `eq', I'm not in
favor of such a change.  Given a good argument, I
might change my mind.  Clear enough?