From: Devin Mullins Date: 2005-12-30T11:36:06+09:00 Subject: Re: What is the difference between :foo and "foo" ? Austin Ziegler wrote: >The Symbol is just a name. > > Er... a thing that /has/ a name. (That being, Symbol#to_s.) A symbol's just a thing. :apple == :apple. :apple.to_s == "apple". :apple.to_i == 23417. The end.* AFAIK, you *can* use a String to do all the things you would do with a Symbol (i.e. identify things)+, but using Symbols is more fun! (More performant, possibly, for the purpose of static identifiers, and a little less line noise, when used as the key to a hash, for example. Plus, if you're using a text editor with syntax highlighting, they'll show up a different color, which is fun.) Devin * Though I'm not a very good one, I'm a mathematician at heart, so I like to define things by their properties. + This is because all the builtin methods that are meant to take a Symbol as a parameter tend to call its #== or #eql? or #hash or #to_s method (the properties of which String mimicks, to an isomorphism), or allow a String to be passed in its place (as is the case with attr_*, e.g.).