From: Chad Perrin Date: 2005-12-30T16:10:27+09:00 Subject: Re: What is the difference between :foo and "foo" ? On Fri, Dec 30, 2005 at 01:36:05PM +0900, Eero Saynatkari wrote: 0. :symbol is to "symbol" as 1 is to "1" Insofar as it is accurate to say that an integer is an atomic numeral, it is likewise accurate to say that a symbol is an atomic string, or so it seems to me. > > 1. Symbols are values. > :foo is like 'foo' or 2 or f = FooObject.new > > 2. Symbols are used to name, describe or label things. > cd_drive_type = :dvd_rom > socks = my_closet[:sock_drawer] > > 3. Common usages. > object.send :method_name, parameter # Could use 'method_name' > attr_accessor :property1, :property2 # Could use 'property1' etc. > > 4. Implementation details. Am I wrong? -- Chad Perrin [ CCD CopyWrite | http://ccd.apotheon.org ] print substr("Just another Perl hacker", 0, -2);