On Thu, 10 Aug 2006, ngoc wrote: > > Symbols can best be described as identities. A symbol is all about who > > it is, not what it is. Fire up irb and see the difference: > > > Many persons use advanced language to explain Symbols to make it more > difficult. > For me, it is a text string like any other text string. But you can not > manipulate it like split, sub!, etc.... There are only 4 methods > (id2name inspect to_i to_s) for it. > > Use it for hash key instead of normal string. (we do not need all > manipulating functions for hash key) > > Is it simple enough? There's (at least) one more key fact (which was hidden inside of the 'use it for hash key instead of normal string') -- there is only one instance of a given symbol allocated in memory at a time, which can be a great boon to writing efficient code. Nate