From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=0.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [94.130.110.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 4224A1F44D for ; Wed, 20 Mar 2024 08:58:25 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=FYEhCXbA; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=Zd8duCrF; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id EAA88835FD; Wed, 20 Mar 2024 08:58:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1710925097; bh=g1JLmH5aROPQ/Q+UJ+1gQA2EuoPt0FclE9TcWYeGY0Q=; h=Date:References:To:Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Cc:From; b=FYEhCXbAFhOc88B6eyuf+77JKzp7U0ObV8fa4hzkDdnbCIVGGpWYMJFvHqcPLE4jj /HgtC0rduru7DiC+w327Hk4/MkhI435Ag7xAX3bl7B5LPeo5npTUemDRNJFk6e4bfZ +HQ9qdSy6yT2GsXNX8P6dh/C5NSvxNdBUeLjjTj0= Received: from s.csnrwnwx.outbound-mail.sendgrid.net (s.csnrwnwx.outbound-mail.sendgrid.net [198.37.146.154]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 3200D835D9 for ; Wed, 20 Mar 2024 08:58:13 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=Zd8duCrF; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:from:subject:to; s=s1; bh=eh3IFS+SboATKP0xuBZ2R9hg5gGWEnx78zg6PEdTqY4=; b=Zd8duCrFsaB4LPRcXe8PGUPMpHgAUiOEANcceVJr90pw4gYSLId/43lb4bmox9vlPE3C 2gQf2lmeM0dSUahWla739ugfomTrMWqQaDwi2OrDe7jjOAoLGAbSwIhwPQYO9NpMp76hPn ZoKx0HxVHM5FZJ6o5FndBQqN+HhhZE79XYI28H7opFfCqJaTToVhrJmvajHsOSaT4jRKLP VrS+OX+yEVUIX/1/yWhZXy8h+8eOBur/Q9KITmVn5vaL5q6BFDPhVcko3d94IHt/AfbZI0 oTI28C5/rPLPynWluZn+Nab/hkI4VF/LTw1BRsu6lGb2pnYX0bFQe9oodGxi/A8w== Received: by recvd-7d655c67dd-hdwsn with SMTP id recvd-7d655c67dd-hdwsn-1-65FAA523-12 2024-03-20 08:58:11.395342262 +0000 UTC m=+129530.795138706 Received: from herokuapp.com (unknown) by geopod-ismtpd-24 (SG) with ESMTP id B8Rne4BkTq-uNTqSCHLpIA for ; Wed, 20 Mar 2024 08:58:11.323 +0000 (UTC) Date: Wed, 20 Mar 2024 08:58:11 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 20350 X-Redmine-Issue-Author: Dan0042 X-Redmine-Issue-Priority: Normal X-Redmine-Sender: byroot X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 93816 X-SG-EID: =?us-ascii?Q?u001=2EKmNZ1u3n1vIpO8NNTdp+Q9c0ai7potxbEDLMO7SOJO=2F4KkRUz0d23466m?= =?us-ascii?Q?naiq=2F5fmA4hb60MdRMUAwHZnjIWVFu=2FrqiBOz5c?= =?us-ascii?Q?nOvkBudsSThoya6bMjKconwcNDQ0OuFffdC+mXa?= =?us-ascii?Q?X=2FEEpaOK6uIlnPBvFOX6V4wpSoFTofyP6=2FX1Gv3?= =?us-ascii?Q?eGNjF8sj+mPEACF9ZPramlYTbPAI2zes976yXzW?= =?us-ascii?Q?NrPsSzU6oeYN1Vn8R3sQ2aFbcLX1WNmeRSqY6aY?= =?us-ascii?Q?P2tYx+2TiS8FlRI5rLcEBKvL+Q=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: LBWDHVDJB3DI6X3LOMCG3HWEV75RYC7B X-Message-ID-Hash: LBWDHVDJB3DI6X3LOMCG3HWEV75RYC7B X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:117249] [Ruby master Feature#20350] Return chilled string from Symbol#to_s List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "byroot (Jean Boussier) via ruby-core" Cc: "byroot (Jean Boussier)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20350 has been updated by byroot (Jean Boussier). To provide some data-point. Our monolith runs with https://github.com/Shopify/symbol-fstring, which makes the return value of `Symbol#to_s` frozen without any problem. I think we had to fix a single gem to make it work a few years back, that's it. That said, while we run a lot of code (700+ transitive gems), that's not necessarily fully representative of the code out there. Also one major difference with chilled string literals is that you can't just set `RUBYOPT="--disable-frozen-string-literal"` to continue running older code. I guess you could monkey patch `String#to_s` though, and provide that as a gem to make it easy to provide backward compatibility. All this to say that as a Ruby user, I'd like this change to happen, because `Symbol#to_s` is a major source of allocation, and Ruby performance is very GC dependent. But as a Ruby committer I think we need to be careful about the rate of deprecation and backward compatibility breaks. On one hand it would sound logical to ship such change at the same time as the change for frozen string literals, but on the other hand it makes the jump bigger and may alienate some users. So it's a fine line to walk. So I'm positive, but with some reservations. ---------------------------------------- Feature #20350: Return chilled string from Symbol#to_s https://bugs.ruby-lang.org/issues/20350#change-107337 * Author: Dan0042 (Daniel DeLorme) * Status: Open ---------------------------------------- During Ruby 2.7 development there was an attempt to return a frozen string from Symbol#to_s (#16150#note-22) This had to be rolled back due to incompatibility, but now we have chilled strings (#20205) Symbol#to_s can safely return a chilled string, giving developers time to fix warnings before switching to a frozen string. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/