emacs-devel
[Top][All Lists]
Advanced

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

Re: master 0da97d6: * src/keyboard.c (timer_check_2): Replace redundant


From: Stefan Monnier
Subject: Re: master 0da97d6: * src/keyboard.c (timer_check_2): Replace redundant test with assertion
Date: Fri, 05 Aug 2022 17:41:00 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii [2022-08-05 21:20:09] wrote:
> IMNSHO, this change is dangerous: it replaces run-time conditions with
> assertions, but IME most if not all of the active developers and
> people who track the master branch don't compile with --enable-checking,
> or don't run the trunk build on a regular basis.  Which means these
> assertions, if they happen, will not be seen nor reported.
>
> So basically you removed a safety net without any replacement.
>
> I suggest to revert this change.  It gains us nothing of importance.

I introduced a bug in my code which made the test fail, which made me
discover that:
- the test currently can never fail (because the code that leads to this
  point checks the condition earlier).
- if the test were to fail, Emacs would lock up in an inf-loop.
I kept an `eassert` basically to document the assumption.


        Stefan




reply via email to

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