emacs-devel
[Top][All Lists]
Advanced

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

Re: Lisp primitives and their calling of the change hooks


From: Stefan Monnier
Subject: Re: Lisp primitives and their calling of the change hooks
Date: Tue, 09 Jan 2018 08:30:21 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> Not just convenience but also "obviously correct", i.e. more maintainable.
> We obviously disagree about what's "correct" in this case, so this
> argument doesn't convince me, exactly like my arguments didn't
> convince you.

Calling `del_range` is "obviously correct" because it's higher level and
guarantees we follow various rules, such as those of b-c-f/a-c-f.
In contract `del_range_2` is a lower-level function which requires more
care to use.  For example a maintainer such as myself would not notice
if a call to del_range_2 is missing a subsequent call to
signal_after_change and even less a call to update_compositions.

So using del_range is more obviously correct.

Having a single call to b-c-f/a-c-f rather than two is not a correctness
issue, only a "quality of implementation" issue.

> As for maintainability, I think this is beyond splitting hair, because
> I cannot for the life of me see any difference in maintainability
> between the two variants.

The fact that someone like Alan failed to notice the need for a call to
update_compositions is good enough evidence for me.


        Stefan




reply via email to

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