From: steve.shreeve@... Date: 2015-08-24T18:30:59+00:00 Subject: [ruby-core:70577] [Ruby trunk - Feature #11473] Immutable String literal in Ruby 3 Issue #11473 has been updated by Steve Shreeve. As a ruby user since 2001, I'd agree with Yusuke Endoh, when he suggests the long-term design preference of Ruby should be:
usability > compatibility > performanceThere are plenty of languages to select if one is truly focused on performance, static typing, different syntax, etc. Seems like there should be a quick way to flag strings as immutable (perhaps just prefixing with a sigil such as '@'?) and that this approach would be used in libraries and other performance centric code. But, if this change means that the following won't work (not my code, just copied from above):
sql = %{SELECT #{sec_id}, pt.path, st.doc_count }
sql << %{FROM #{stats_tablename} AS st }
sql << %{JOIN #{path_tablename} AS pt ON (st.path_id = pt.id) }
then, it seems like we're losing some of what makes ruby so fun and easy to use.
----------------------------------------
Feature #11473: Immutable String literal in Ruby 3
https://bugs.ruby-lang.org/issues/11473#change-53985
* Author: Koichi Sasada
* Status: Open
* Priority: Normal
* Assignee: Yukihiro Matsumoto
----------------------------------------
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/