From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70784: Abolish string resizing Date: Mon, 06 May 2024 13:57:28 +0300 Message-ID: <865xvrcinb.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25537"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, mattias.engdegard@gmail.com, 70784@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 06 12:58:58 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s3w3e-0006Qj-Ck for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 May 2024 12:58:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3w3P-00018U-6m; Mon, 06 May 2024 06:58:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3w3K-00011J-OH for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 06:58:38 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s3w3K-0001cM-G7 for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 06:58:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s3w3i-000886-9O for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 06:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 May 2024 10:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70784 X-GNU-PR-Package: emacs Original-Received: via spool by 70784-submit@debbugs.gnu.org id=B70784.171499309031235 (code B ref 70784); Mon, 06 May 2024 10:59:02 +0000 Original-Received: (at 70784) by debbugs.gnu.org; 6 May 2024 10:58:10 +0000 Original-Received: from localhost ([127.0.0.1]:37251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3w2r-00087j-Ry for submit@debbugs.gnu.org; Mon, 06 May 2024 06:58:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3w2o-00087K-Db for 70784@debbugs.gnu.org; Mon, 06 May 2024 06:58:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3w2K-0000dg-0d; Mon, 06 May 2024 06:57:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=KMsFrnj3FBCAPW51w09lsLvBfBARZXB2YBiQ/W1qUyY=; b=a/2Ck4Pvh7+BGFeF6E1r kUq6kH/LAqJpXGeavzzJrtI3xBrrBMJPCUL2WifRB3hV44HIFNRrhKctIRmtIy9SsVh4rxD4r+61K e2yHiM8A0Xm3shUxG7ZqxcY8l3XW2ao67ASssrWjNlZ+3wdq+w1qCXZDzplL202b1ZdUP4+D4EEMS 4H63BKUCc976XcMtruFsFeKOIBZLO2q+aRXh2SNrP07sfpJ+m/26DCMAP/raR/q1wuc72AZ+k9uxl zVDrN19uQIAvn3ivCJ8O9MQM6I1jUjx6lJwrbx45t1+/hyE+4m68ZpCYvTeZRMlz6GgUUzt1lBJE7 DRiSZXveHQ7ZnA==; In-Reply-To: (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284566 Archived-At: > Cc: Mattias EngdegÄrd , > 70784@debbugs.gnu.org > Date: Sun, 05 May 2024 22:41:54 -0400 > From: Stefan Monnier via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > >> The Elisp ability to resize strings is high-cost, low-benefit, so we > >> should abolish it. > > What is the improvement to be had by "abolishing" this immemorial > > feature? > > Actually, it's not "immemorial", it's just old: > > commit 3c9de1afcde82a99137721436c822059cce79b5b > Author: Kenichi Handa > Date: Fri Jul 21 06:45:30 2000 +0000 > > (Faset): Allow storing any multibyte character in a string. Convert > unibyte string to multibyte if necessary. > > IOW, since Emacs-21.1. That's only half of the story, AFAIR. The other half is that Emacs before version 20 allowed aset with any string anywhere, because characters back then were always unibyte. We lost that with introduction of MULE, and the above change by Kenichi restored the lost functionality (which was evidently deemed important enough back then).