From: Philip Mak Date: 2002-10-17T14:48:16+09:00 Subject: Strings or symbols? When working with a record that has various fields represented using a hash, do you prefer strings or symbols? Why? With strings, it's like this: person = { :name => "John Doe", :age => 20 } With symbols, it's like this: person = { 'name' => "John Doe", 'age' => 20 } Symbols are one character shorter to type (:name v.s. 'name'). But, then I have to convert between symbols and strings sometimes using String#intern or Symbol#id2name. I do a lot of CGI programming; if a script like this is called: add_person.rhtml?name=John%20Doe;age=20 then the "name" and "age" are given to me as strings, so I have to call String#intern in order to convert them into symbols first.