From: Eero Saynatkari Date: 2005-12-29T10:44:18+09:00 Subject: Re: What is the difference between :foo and "foo" ? Yohanes Santoso wrote: > Alex Knaub writes: > >> 2005/12/28, Surgeon : >>> Hi, >>> >>> I am a Ruby newbie. I wish I didn't post such a simple question here >>> but I had to. >>> What is the difference between :foo (a keyword) and "foo"(a string). >>> Can they be used interchangeably? Are they fundamentally same and is >>> the only difference performance? >> >> http://onestepback.org/index.cgi/Tech/Ruby/SymbolsAreNotImmutableStrings.red > > What a coincidence. Seems like Jim and I finally had enough of people > conflating symbols and immutable strings on the same day. > > http://microjet.ath.cx/WebWiki/2005.12.27_UsingSymbolsForTheWrongReason.html While, technically speaking, both of you are absolutely and undeniably correct (with one correction: Symbols are not Strings), such a conflation is the best way to get someone over the initial confusion. As this thread quite well demonstrates, a definition for Symbols is quite difficult to come up with. To paraphrase fifteen thousand fourty-three mediocre comedians over the last three centuries: "A Symbol is like a word, a sentence, a phrase, a description or, perhaps, a name. Except sometimes." > YS. E -- Posted via http://www.ruby-forum.com/.