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: `aset` on strings, changing the size in bytes Date: Fri, 07 Sep 2018 22:04:36 -0400 Message-ID: References: <88must56x4.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1536372164 1339 195.159.176.226 (8 Sep 2018 02:02:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 8 Sep 2018 02:02:44 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Johan =?windows-1252?Q?Bockg=E5rd?= , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 08 04:02:39 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 1fySa7-0000G5-GY for ged-emacs-devel@m.gmane.org; Sat, 08 Sep 2018 04:02:39 +0200 Original-Received: from localhost ([::1]:41001 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fyScD-0001Py-M8 for ged-emacs-devel@m.gmane.org; Fri, 07 Sep 2018 22:04:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51612) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fySc7-0001Pi-H3 for emacs-devel@gnu.org; Fri, 07 Sep 2018 22:04:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fySc4-00027M-5Y for emacs-devel@gnu.org; Fri, 07 Sep 2018 22:04:43 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:50857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fySc4-00025w-0N; Fri, 07 Sep 2018 22:04:40 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w8824a2U016975; Fri, 7 Sep 2018 22:04:37 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 983376A38A; Fri, 7 Sep 2018 22:04:36 -0400 (EDT) In-Reply-To: (Paul Eggert's message of "Fri, 7 Sep 2018 16:12:07 -0700") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6369=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6369> : inlines <6865> : streams <1797810> : uri <2705475> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:229465 Archived-At: >> According to the documentation, that is already an error... >> (info "(elisp) Modifying Strings") > Cool! That means we can do Stefan's request simply by reverting Kenichi > Handa's patch that introduced the ability to change the byte length > of a string (commit 3c9de1afcde82a99137721436c822059cce79b5b dated > 2000-07-21 06:45:30 UTC), since that patch made the code explicitly disagree > with the documentation. It's very easy to accidentally use that feature, so just because it was in some doc somewhere doesn't mean no code makes use of it, or that any code that does deserves to get an error. So we can't just revert that patch. We should first announce the reversal of stance (if not compared to the doc, at least compared to the code), and then introduce some test&warning. > Though this leaves open the question of why Handa made that change in > the first place. I remember being disappointed by the change, but I can't remember exactly what was the original justification. I think the stance was simply that it was reasonably easy to implement (because of the pre-existing string-compaction code) and it would satisfy a user request. Stefan