From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Lisp primitives and their calling of the change hooks Date: Tue, 09 Jan 2018 20:50:23 +0200 Message-ID: <83wp0q6f4g.fsf@gnu.org> 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> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1515523797 23409 195.159.176.226 (9 Jan 2018 18:49:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 9 Jan 2018 18:49:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 09 19:49:53 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 1eYyy1-0005JU-C4 for ged-emacs-devel@m.gmane.org; Tue, 09 Jan 2018 19:49:45 +0100 Original-Received: from localhost ([::1]:40565 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYz00-0003V7-QX for ged-emacs-devel@m.gmane.org; Tue, 09 Jan 2018 13:51:48 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYyyw-0003OJ-A5 for emacs-devel@gnu.org; Tue, 09 Jan 2018 13:50:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYyyn-0005I6-Oq for emacs-devel@gnu.org; Tue, 09 Jan 2018 13:50:42 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYyyn-0005Hm-H3; Tue, 09 Jan 2018 13:50:33 -0500 Original-Received: from [176.228.60.248] (port=1369 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eYyym-00054t-Ed; Tue, 09 Jan 2018 13:50:33 -0500 In-reply-to: (message from Stefan Monnier on Tue, 09 Jan 2018 08:30:21 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:221764 Archived-At: > From: Stefan Monnier > Date: Tue, 09 Jan 2018 08:30:21 -0500 > > >> 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. There are 3 other places in our sources that call del_range_2, so I see no reason to fear of one more, or proclaim that "incorrect" or "less obviously correct". > > 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. No, it just is another manifestation of a known truism that patch review is a very useful and efficient technique for catching bugs before they happen. We all make mistakes, and the fact that we do doesn't necessarily mean the code we wrote is "incorrect" or "difficult to maintain".