From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Lisp primitives and their calling of the change hooks Date: Tue, 09 Jan 2018 08:30:21 -0500 Message-ID: References: <20180107120859.GB22254@ACM> <20180107135629.GC22254@ACM> <83mv1p8vki.fsf@gnu.org> <83bmi58sao.fsf@gnu.org> <20180107194845.GE22254@ACM> <838td98mqe.fsf@gnu.org> <20180107211055.GF22254@ACM> <837est81bl.fsf@gnu.org> <20180108192415.GA5531@ACM> <83h8rw6oio.fsf@gnu.org> <83a7xn7kjc.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1515504532 20139 195.159.176.226 (9 Jan 2018 13:28:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 9 Jan 2018 13:28:52 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 09 14:28:48 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYtxM-0004hq-Au for ged-emacs-devel@m.gmane.org; Tue, 09 Jan 2018 14:28:44 +0100 Original-Received: from localhost ([::1]:52843 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYtzL-00079d-La for ged-emacs-devel@m.gmane.org; Tue, 09 Jan 2018 08:30:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYtzC-00078H-BX for emacs-devel@gnu.org; Tue, 09 Jan 2018 08:30:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYtz5-0006Cm-3L for emacs-devel@gnu.org; Tue, 09 Jan 2018 08:30:36 -0500 Original-Received: from [195.159.176.226] (port=58612 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eYtz4-0006Bu-SC for emacs-devel@gnu.org; Tue, 09 Jan 2018 08:30:31 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eYtx2-0003bX-Q4 for emacs-devel@gnu.org; Tue, 09 Jan 2018 14:28:24 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:mymcz2jzz5s+QemKL/SVl4KYO28= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:221759 Archived-At: >> 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