From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: master 49e243c0c85: Avoid resizing mutation in subst-char-in-string, take two Date: Wed, 15 May 2024 19:29:04 +0200 Message-ID: <5E014BBB-D2F5-4B3E-8555-6B7A8D11F15E@gmail.com> References: <865xvhy4wn.fsf@gnu.org> <8AF4F364-9030-4634-91C5-79E297E5335B@gmail.com> <861q65x6yp.fsf@gnu.org> <718E190B-3C90-4304-87D8-69E82A1C7AC9@gmail.com> <86eda4wrru.fsf@gnu.org> <86o797tfi0.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14415"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 15 19:29:56 2024 Return-path: Envelope-to: ged-emacs-devel@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 1s7IRv-0003XC-VZ for ged-emacs-devel@m.gmane-mx.org; Wed, 15 May 2024 19:29:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7IRH-00047C-Qk; Wed, 15 May 2024 13:29:16 -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 1s7IRF-00046x-NQ for emacs-devel@gnu.org; Wed, 15 May 2024 13:29:14 -0400 Original-Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7IRD-0000lx-64; Wed, 15 May 2024 13:29:12 -0400 Original-Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-51f0b6b682fso7774503e87.1; Wed, 15 May 2024 10:29:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715794148; x=1716398948; darn=gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=ho6Bm0CZNRBxlPp0fWf1fbK94dO0QbW/EKsIpr6eHfE=; b=SoSyabplWXJ5J7nu5xZXJnlPd1r3Um67rbLcTFW40iDGmv6M9hFAvpDcny51Hp1RYe AJzaKPDD4SW5oOMbmheO30L2FBxrI0xco8OTGYj++4Z9XfPbnjdKQi7wQA1sKuHcQLiG UvLN9TinrDrU0XKf+4gaNGOHw1VxnXaLz+LTz3Zx4fc+I5Y4PI7Erkp0sAFEeaUbBGb+ XPLMwS6od+1OX1crIMCDL+xbK/1P3mwAww/ocQvlijtbHFsRcpb0LT0/1Jjqst//jthE HxWyaOo/R8GZ3bqFgo5GgbKuOfAfqHcDoCp+izAP0wmTQMYQwRLvvK8DUGvned36Mgps ovcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715794148; x=1716398948; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ho6Bm0CZNRBxlPp0fWf1fbK94dO0QbW/EKsIpr6eHfE=; b=b5kbL2J0AYjk3Y1j4SyBteeVSTaWzR5g3N3TbFpzd0YilS0lanm114edCMJxv2NJNh W8eFlpW/BjlKDx38OBlOaw4fAkGp9EatqNYmKMtqj8T46/BZsSSB40mYMuhHMMYAY5Yu wb8oi7pc1XWRycoVjuPAfuHzedHFC4zSbih49IxQSZvdeMU2k9P4cS13iaMrhqf0IZ/O zGQnbGraVGcoVjb0jyIXa/QrCEJwj8JDYY2hGMsXB0WZPYlzUGYLko+XbS38SN4UtEOQ EivIRzqLfGU/fYYKywTabE2EkMTqWHOtlmqUPo26RXgXA3x3sQl7akQRqh+er5c7HDrf ntGQ== X-Gm-Message-State: AOJu0Yy/C3kw1oP9vo5iFkDrHoAN3oHYKsBg11BvEm5FGy7uQRIz9jVJ LmXsnzMl/LIDLLUQysiFim28kxlNbHIUEvMaiXYQAbQSjm3wRb3q2j+JsQ== X-Google-Smtp-Source: AGHT+IELmruXFWCTKJN0at5Xqbs1xC1QWhIYgOe1cGHl2k1xMBuXKrX+aEyR9+FSghT43XWv20+ycg== X-Received: by 2002:a05:6512:789:b0:51f:621:fdaa with SMTP id 2adb3069b0e04-5220fc7bd97mr13812712e87.18.1715794147721; Wed, 15 May 2024 10:29:07 -0700 (PDT) Original-Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se. [80.217.1.132]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-521f39d2bb6sm2630606e87.249.2024.05.15.10.29.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 May 2024 10:29:07 -0700 (PDT) In-Reply-To: <86o797tfi0.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.120.0.1.15) Received-SPF: pass client-ip=2a00:1450:4864:20::12b; envelope-from=mattias.engdegard@gmail.com; helo=mail-lf1-x12b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:319260 Archived-At: 15 maj 2024 kl. 14.40 skrev Eli Zaretskii : > One important use case where this is not rare at all is when replacing > characters from the same Unicode block (=3D "script"). It is very rare to see replacement exclusively confined to single block, = except for block 0 (ASCII). Scripts, even Latin, generally transcend = blocks and even planes. Text written in one script also tends to include = characters from blocks not related to that script, such as symbols, = spaces, combining marks, numerals etc. The usefulness of equal-length multibyte `aset` is very small, and given = how rare string mutation is in general, this makes it just not worth = taking into account. Clear, simple and predictable rules are far more = important. One reason why single-character multibyte replacement (`aset`, = `subst-char-in-string`, `store-substring`, most of the cl-lib functions = etc) is so rare is that in the world of Unicode, a 'character' can be a = sequence of scalar values (combining chars, modifiers etc) so a = one-for-one value replacement is just too inflexible and limiting.