From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Lisp primitives and their calling of the change hooks Date: Wed, 10 Jan 2018 21:03:34 +0000 Message-ID: <20180110210334.GD6175@ACM> References: <20180107211055.GF22254@ACM> <837est81bl.fsf@gnu.org> <20180108192415.GA5531@ACM> <83h8rw6oio.fsf@gnu.org> <20180109195357.GA3869@ACM> <20180110184521.GB6175@ACM> <20180110194839.GC6175@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1515618429 6057 195.159.176.226 (10 Jan 2018 21:07:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 10 Jan 2018 21:07:09 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 10 22:07:05 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 1eZNaG-0000Q8-UO for ged-emacs-devel@m.gmane.org; Wed, 10 Jan 2018 22:06:53 +0100 Original-Received: from localhost ([::1]:40358 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZNcE-0003Nc-Dq for ged-emacs-devel@m.gmane.org; Wed, 10 Jan 2018 16:08:54 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZNc7-0003LG-FS for emacs-devel@gnu.org; Wed, 10 Jan 2018 16:08:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZNc4-0002ji-8h for emacs-devel@gnu.org; Wed, 10 Jan 2018 16:08:47 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:49203 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1eZNc3-0002g0-Nw for emacs-devel@gnu.org; Wed, 10 Jan 2018 16:08:44 -0500 Original-Received: (qmail 85430 invoked by uid 3782); 10 Jan 2018 21:08:40 -0000 Original-Received: from acm.muc.de (p548C7214.dip0.t-ipconnect.de [84.140.114.20]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 10 Jan 2018 22:08:39 +0100 Original-Received: (qmail 8315 invoked by uid 1000); 10 Jan 2018 21:03:34 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 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:221812 Archived-At: Hello, Stefan. On Wed, Jan 10, 2018 at 15:33:16 -0500, Stefan Monnier wrote: > > Non-balanced change hooks necessitate special handling. > I can't imagine why it would be significantly more difficult to handle > bcf bcf acf > than > bcf acf acf > And I can't see why it would be easier to handle > bcf bcf acf > only for the special case where the "missing" acf would have had the > same length as the previous bcf (i.e. comes from a primitive which > doesn't change the length of the buffer). Again, what advantages (other than not changing existing C code) are there in allowing non-balanced b/a-c-f at all? The difference in run time between bcf acf acf acf .... acf (in the cases we currently do this) and bcf acf bcf acf bcf acf .... bcf acf is surely negligible, and it is not at all clear that the latter (which can have simpler hook functions) would be slower than the former (which may need elaborate special handling). > Stefan -- Alan Mackenzie (Nuremberg, Germany).