From: James Edward Gray II Date: 2005-12-27T08:27:58+09:00 Subject: Re: Forwardable -- :[] -- :@what On Dec 26, 2005, at 5:12 PM, Warren Seltzer wrote: > Reading about Forwardable I was shocked to see strange symbol- > looking notations I'd never > seen before. Nothing the pickaxe led me to believe that :[] > or :@variable was valid Ruby. > I've since figured out, I think, what it must mean but I'm > wondering: What other crazy > syntax am I going to have to figure out? And does :[] simply name > a function, as I think? > > Will I be seeing :&, :**, :) and so on? Or even :-) ? > > Shocked, simply shocked... Symbols are really just immutable Strings. Not too much magic there. By convention, we generally use them to refer to method names and the like inside our programs (i.e. :each instead of "each"). That's just because they are easier to type, faster in performance, and we won't need all of String's helper methods for them. Hope that helps explain what you are seeing. James Edward Gray II