[#79440] [Ruby trunk Bug#13188] Reinitialize Ruby VM. — shyouhei@...
SXNzdWUgIzEzMTg4IGhhcyBiZWVuIHVwZGF0ZWQgYnkgU2h5b3VoZWkgVXJhYmUuCgoKTWFydGlu
6 messages
2017/02/06
[#79441] Re: [Ruby trunk Bug#13188] Reinitialize Ruby VM.
— SASADA Koichi <ko1@...>
2017/02/06
On 2017/02/06 10:10, shyouhei@ruby-lang.org wrote:
[#79532] Immutable Strings vs Symbols — Daniel Ferreira <subtileos@...>
Hi,
15 messages
2017/02/15
[#79541] Re: Immutable Strings vs Symbols
— Rodrigo Rosenfeld Rosas <rr.rosas@...>
2017/02/15
Em 15-02-2017 05:05, Daniel Ferreira escreveu:
[#79543] Re: Immutable Strings vs Symbols
— Daniel Ferreira <subtileos@...>
2017/02/16
Hi Rodrigo,
[#79560] Re: Immutable Strings vs Symbols
— Rodrigo Rosenfeld Rosas <rr.rosas@...>
2017/02/16
Em 15-02-2017 22:39, Daniel Ferreira escreveu:
[ruby-core:79616] Re: Immutable Strings vs Symbols
From:
Jeremy Evans <code@...>
Date:
2017-02-20 03:16:33 UTC
List:
ruby-core #79616
On 02/19 11:08, Daniel Ferreira wrote: > There are challenges but maybe we can find a solution that would be > feasible in Ruby 3. > > I would like to start a new discussion about this subject because I > deeply believe ruby will be better if we succeed to do so. > > As I see it, everyone agrees there is a problem. > We just weren't able to find the best solution to resolve it. > Lets try to do that in Ruby 3. Not everyone agrees there is a problem. I think the current behavior of treating strings and symbols differently is best, as they represent separate concepts. My comment on #7792: "The basic philosophical difference between a symbol and a string is a ruby symbol is an identifier, while a ruby string just represents arbitrary data. You should convert a string to a symbol if you know that the data the string contains represents an identifier you would like to use. You should convert a symbol to a string if you are using name of the identifier as data." Matz's final comment on #5964: "In Ruby, Symbols annd Strings are different in both semantics and behavior (and implementation). Unifying them cause a lot of problems. I guess it's not worth changing." I think part of the confusion about the difference between Symbol and String stems from the changes in ruby 1.9, which added many String methods to Symbol. In ruby 1.8, this distinction of symbols for identifiers and strings for data was more apparent. Thanks, Jeremy Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>