On 12/29/05, Austin Ziegler <halostatue / gmail.com> wrote: <snip> > What > makes Symbols "special" in the current implementation is that a Symbol > is created for every named item. > > >> olds = Symbol.all_symbols; nil > nil > >> quuxl = 0 > 0 > >> Symbol.all_symbols - olds > [:quuxl] > > But as I stated in the blog entry I posted above, the Symbol is just a > name. What gives a Symbol its power is the thing that uses it, such as > attr_accessor. Symbols are names. No more, no less. > > Really, I think that people create the confusion for themselves, > expecting them to be more than they are. > > -austin I think that the same thing that "makes symbols 'special' in the current implementation" is what creates confusion for people. I know that the idea that the "thingy" in the symbol table is the same "thingy" represented by an immediate object that has a literal representation seemed very voodoo/black magic to me at first, coming from languages where the symbol table is a hidden, reserved, internal sort of structure. From the outside, Symbols look like they were invented solely to facilitate meta-programming, which is why they have all the "name" conceptual baggage attached. In other words, to a non-Rubyist, a natural question to ask is, "If you didn't need easy access to names in or destined for the symbol table, would Symbol objects exist in Ruby?" (Probably followed by "And why do you need access to names in the symbol table, anyway?") -A