From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Date: Thu, 09 Jul 2020 15:37:59 +0000 Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <1690361185.4397117.1593879228865@mail.yahoo.com> <374F2E9C-E8C2-4362-8BEF-E6AA5EEE5C79@acm.org> <68F4CFD4-17BF-4ADA-B2EF-55281ACD2373@acm.org> <926674413.6042347.1594070583586@mail.yahoo.com> <475381031.6812910.1594139070322@mail.yahoo.com> <459BE59A-76CE-46A3-BE5E-B65AED0B85F5@acm.org> <4A6D5CD1-031E-4DF8-9FE5-365DF17E14CA@acm.org> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37748"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Paul Eggert , Andrea Corallo , 42147-done@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 09 17:39:08 2020 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 1jtYdg-0009is-Du for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jul 2020 17:39:08 +0200 Original-Received: from localhost ([::1]:36402 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtYdf-0001ME-Gh for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jul 2020 11:39:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtYda-0001M4-67 for bug-gnu-emacs@gnu.org; Thu, 09 Jul 2020 11:39:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58183) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jtYdZ-0004He-T1 for bug-gnu-emacs@gnu.org; Thu, 09 Jul 2020 11:39:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jtYdZ-0006vn-Pa for bug-gnu-emacs@gnu.org; Thu, 09 Jul 2020 11:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jul 2020 15:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs Original-Received: via spool by 42147-done@debbugs.gnu.org id=D42147.159430908926563 (code D ref 42147); Thu, 09 Jul 2020 15:39:01 +0000 Original-Received: (at 42147-done) by debbugs.gnu.org; 9 Jul 2020 15:38:09 +0000 Original-Received: from localhost ([127.0.0.1]:41496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtYcj-0006uN-5T for submit@debbugs.gnu.org; Thu, 09 Jul 2020 11:38:09 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:62878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtYcg-0006uC-L3 for 42147-done@debbugs.gnu.org; Thu, 09 Jul 2020 11:38:07 -0400 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 069FbxeI020471; Thu, 9 Jul 2020 15:38:00 GMT In-Reply-To: (Stefan Monnier's message of "Thu, 09 Jul 2020 10:35:51 -0400") 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" Xref: news.gmane.io gmane.emacs.bugs:182866 Archived-At: Stefan Monnier writes: >> What's your suggestion on this optimization? Do you think can be on with >> default settings or is it dangerous? > > AFAICT it's been on since Emacs-21, which seems to argue for "not too dangerous". Great, thanks both for your suggestions. BTW IMO if the only way to *certainly* get a mutable string is with `copy-sequence' or `make-string' I think we could document it. Is a simple rule easy to understand and clarifies the situation. Andrea -- akrl@sdf.org