Issue #11473 has been updated by shevegen (Robert A. Heiler).


Since this will soon be discussed in the upcoming ruby developer
meeting, I only wanted to add two small things:

- First, Yusuke Endoh wrote back then:

> "" as a StringBuilder is acutally useful. "".dup is too tiring.

I myself use frozen Strings a lot these days. I am fine by them.
But I agree that "" is prettier IMO than "".dup.

- The second thing, I can understand that stdlib/core wants to 
use frozen Strings when possible due to various reasons. I have
no problem with that at all. I myself, though, would like to 
retain the possibility to not use frozen Strings if possible,
WHEN I would prefer not to. The current way via a frozen-string
comment at the ~top of a .rb file works well for me - I would
like to see this way retained. That way, ruby can change to
default to frozen strings by default, all of the time, but 
ruby hackers can also continue to specify that they may want
to not use frozen strings. (I use frozen Strings almost 
everywhere nowadays but I still want to retain the option to
not have to use it; I use .dup explicitely though since I
do not like the unary - operator/thingy even though it is 
much shorter).

----------------------------------------
Feature #11473: Immutable String literal in Ruby 3
https://bugs.ruby-lang.org/issues/11473#change-70970

* Author: ko1 (Koichi Sasada)
* Status: Assigned
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* Target version: 
----------------------------------------
Matz said "All String literals are immutable (frozen) on Ruby 3".

This ticket is place holder to discuss about that.




-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>