From: Paul Lynch Date: 2006-08-10T05:08:09+09:00 Subject: Re: does ":" have an anolog in another language? On 9 Aug 2006, at 15:15, 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? What works for me is to think of a symbol as a uniqued constant (or immutable) string. This may depend on my language background, however (Objective C, largely). Paul