On Dec 28, 2005, at 3:22 PM, Ross Bamford wrote: > On Wed, 28 Dec 2005 19:47:16 -0000, Steve Litt > <slitt / earthlink.net> wrote: >> The preceding URL tells me unequivically that symbols aren't >> strings, but >> really doesn't tell me too much about what they are, other than what, >> names??? > > An object with a name seems a good way to put it - maybe 'an object > that is a name, by which it can be referenced anywhere'. At the new_haven.rb December meeting, I gave a short presentation on Symbols versus Strings. I described Symbols as: Named numbers, you pick the name, Ruby picks the number The number that Ruby picks is effectively an index into an internal table with some bit shifting and masking to encode the index into a 32-bit Ruby reference value. The internal table gets new entries when a symbol literal is parsed or when String#to_sym is called. Gary Wright