From: Austin Ziegler Date: 2005-12-31T06:53:11+09:00 Subject: Re: What is the difference between :foo and "foo" ? On 30/12/05, Steve Litt wrote: > On Friday 30 December 2005 03:50 pm, Caleb Tennis wrote: > > > I have no idea of the internal representation, but I do know when I use > > > to_s on a symbol I get a string, and when I use to_i on that same symbol > > > I get an integer, so in a generic, non-ruby-dependent way, it has an > > > integer and a string. If it didn't "have" or "possess" or "be cognisant > > > of" both the integer and the string, I wouldn't be able to deduce the > > > string and integer with to_s and to_i. > > > > I think the nomenclature of "has" isn't valid because the symbol doesn't > > contain those things. Much like > > > > a = "53" > > a.to_i > > > > => 53 > > > > "a" doesn't contain an integer. It does, however, contain a method that > > allows you to convert it to an integer representation. > > I understand what you're saying Caleb. Austin -- is that what you meant? Yes. I've just sent you a VERY lengthy VERY critical review of your document that emphasizes that it is a conversion at all times. Symbols have neither string nor integer values, but has converters. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca