From: Jim Weirich Date: 2005-07-27T01:57:21+09:00 Subject: Re: Trying to understand symbols On Tuesday 26 July 2005 11:36 am, Sam Kong wrote: > 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? Not really. Strings are used because of their content, immutable or not. Symbols are used because they uniquely define a single object. If you know lisp, then we can say that Ruby symbols are like Lisp atoms. If you don't know Lisp, then learn it first, then we can say that Ruby symbols are like Lisp atoms. ;) -- -- Jim Weirich jim@weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)