From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Returning argument string (regexp-quote) Date: Tue, 24 Sep 2019 19:20:09 +0300 Message-ID: <83sgoloedi.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="260932"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 24 19:11:12 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iCoLG-0015mb-Pz for ged-emacs-devel@m.gmane.org; Tue, 24 Sep 2019 19:11:10 +0200 Original-Received: from localhost ([::1]:48830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCoLF-00059g-8a for ged-emacs-devel@m.gmane.org; Tue, 24 Sep 2019 13:11:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58963) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCnY8-00082x-7D for emacs-devel@gnu.org; Tue, 24 Sep 2019 12:20:25 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iCnY7-0007Ul-UO; Tue, 24 Sep 2019 12:20:23 -0400 Original-Received: from [176.228.60.248] (port=3201 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iCnY7-0007I6-5b; Tue, 24 Sep 2019 12:20:23 -0400 In-reply-to: (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Tue, 24 Sep 2019 13:28:15 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:240279 Archived-At: > Feedback-ID: mattiase@acm.or > From: Mattias EngdegÄrd > Date: Tue, 24 Sep 2019 13:28:15 +0200 > > More generally, do we need to preserve allocation for functions not specifically documented to return new strings? I can imagine there being code that depend on it by accident, but string mutation is rare. I think the benefits from such general changes are barely tangible, whereas the risk of breaking someone's (perhaps even ours) code are real. So I don't think we should do that, not in general.