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

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

bug#54802: OClosure: Make `interactive-form` a generic function


From: Eli Zaretskii
Subject: bug#54802: OClosure: Make `interactive-form` a generic function
Date: Tue, 19 Apr 2022 16:53:37 +0300

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: luangruo@yahoo.com,  54802@debbugs.gnu.org
> Date: Tue, 19 Apr 2022 09:34:47 -0400
> 
> >> Not sure what you mean by "affect all of Emacs".  It affects
> >> a well-delimited (and small) part of the code.
> > It is called outside of the advice functions.
> 
> The patch under discussion moves a well-understood and simple piece of
> code from C to ELisp, and while doing so marks the resulting function as
> generic so that it can be overridden on a case-by-case basis
> by packages.
> 
> The move from C to ELisp should make no difference other than
> performance.

We've seen this proven wrong quite a few times already.  This isn't
the first time we move some "well-understood and simple" code from C
to Lisp.  And every time we did that it had unintended consequences:
subtle bugs, features that were lost, subtly changed behavior, etc.
How many times we need to experience this before we all understand
that there are no "well-understood and simple" enough code in Emacs
internals that can be reimplemented without consequences?

I could understand an argument about advantages that outweigh these
costs, but denying these costs exist? that I cannot understand, given
our common experience.

> The fact of marking it as generic does not directly have any impact at
> all (literally: it just adds a `cl--generic` property to the
> `interactive-form` symbol but the content of the `symbol-function` is
> the same as it would be for a normal function :-).

And makes debugging harder while at that.  Right?

> >> Are you worried about introducing bugs, about the performance impact,
> >> or something else?
> > All of them.
> 
> What makes you think this can introduce bugs?

Bitter experience.  You were there, so I'm surprised you don't have
the same experience.

> What kinds of bugs?

How should I know?  We will know when we discover them, months or
maybe years from now.  But discover them we will, of that I'm certain.

> Care to be a bit more specific about the "something else"?

See above.





reply via email to

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