On 15 Feb 2017 17:06, "Daniel Ferreira" <subtileos / gmail.com> wrote:

Hi,

I would like to ask ruby core members the following question if it is
possible:

With the advent of Immutable Strings in ruby 3 what will be the
difference between Immutable Strings and Symbols?

Performance wise will Immutable Strings be similar to Symbols?

If we put the hypothesis of removing Symbols from ruby would that have
any negative impact on performance?

What other side effects could we envision?

Thanks,

Daniel


Semantically speaking, a symbol is like a single-bit of data. It's only
value is its existence, and it's only operation is identity comparison.

A string is an ordered sequence of characters or code points, with a huge
collection of methods relating to sub- and superstring access/creation,
character and substring transformations & translations, etc. etc.

That we can cast from one to the other and back again (even that symbols
were exposed in the language at all) has been the source of much confusion
in the greater Ruby community.

My hope (FWIW) is that properly optimised immutable strings will alleviate
a lot of that confusion, and symbols will drift back toward their obscure
and arcane One True Purpose. (I.e. identifying internal objects like
functions and variables)

Cheers
(supressed text/html)
Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>