From: Kirk Haines Date: 2005-12-30T01:20:56+09:00 Subject: Re: What is the difference between :foo and "foo" ? On Thursday 29 December 2005 8:45 am, Steve Litt wrote: > They wouldn't exist, or they wouldn't be called symbols. If I'm referring > to an instance instead of a value, I could call it &variable as in C, or I > could call it :variable, but in that case I'd call it a reference, not a > symbol. It's not a reference. Symbols are much simpler than that. Really. They are just an integer with some sequence of characters to represent it, all wrapped up in an object. :foo has nothing to do with a variable named @foo, or a method named foo() or anything else. It's just the characters "foo" associated with an integer. That association lasts for the life of the Ruby interpreter process. That's all there is to it. They are _simple_ constructs. My hunch is that the confusion for people new to the language is simply that they are trying to map them to something more complex than Symbols really are, and they don't happen to find any clear, concise, handy documentation to explain them. Kirk Haines