Hi --

On 3/8/07, Gary Wright <gwtmp01 / mac.com> wrote:
>
> On Mar 8, 2007, at 12:41 AM, Chad Perrin wrote:
> > Obviously, a symbol is different in easily explained ways from string
> > variables, without having to drag implementation into it.  Things
> > aren't
> > quite so clear-cut between symbols and string *literals*, though.
>
> I'm not sure that the problem you are describing has anything to do with
> symbols.  Anyone learning Ruby is going to have to understand the
> difference between "1", 1, 1.0, /1/, and :1. Symbol literals
> aren't really special in this regard.

I'll add yet another way of thinking about symbols, namely that they
are very integer-like. All of the immutable, unique, immediate-value
stuff is not so much a modification of how strings behave as a rather
exact replication of how integers behave.


David

-- 
Q. What is THE Ruby book for Rails developers?
A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black)
   (See what readers are saying!  http://www.rubypal.com/r4rrevs.pdf)
Q. Where can I get Ruby/Rails on-site training, consulting, coaching?
A. Ruby Power and Light, LLC (http://www.rubypal.com)