Trying to understand symbols

May I think that symbols exist in Ruby becuase Ruby's strings are not
immutable?
Python, Java, and C# don't have symbols as far as I know.
Is it because their strings are immutable?

Java has an equivalent, actually. Interned Strings (http://mindprod.com/jgloss/interned.html\). They're odd, in that they have the same class as normal Strings, but they satisfy the qualities other people are talking about -- object equality for equal strings, for instance.

Dunno about Python & C#.

Devin

twifkak@comcast.net wrote:

Java has an equivalent, actually. Interned Strings (http://mindprod.com/jgloss/interned.html\). They're odd, in that they have the same class as normal Strings, but they satisfy the qualities other people are talking about -- object equality for equal strings, for instance.

Dunno about Python & C#.

C# also interns strings in compile time if the string is simple (just
one word, AFAIK).
However, that's for saving memory, not like Ruby's symbol

Thanks.
Sam