From: Anders Bengtsson Date: 2002-10-17T19:44:15+09:00 Subject: Re: Strings or symbols? Philip Mak wrote: > When working with a record that has various fields represented using a > hash, do you prefer strings or symbols? Why? > person = { > :name => "John Doe", > :age => 20 > } I would probably use symbols, since it is the same few values used many times. But wouldn't write code like the above. I would create a class "Person" instead. Hashes with a fixed set of keys are almost screaming for you to create a new class. /Anders -- A n d e r s B e n g t s s o n | ndrsbngtssn@yahoo.se Stockholm, Sweden | _____________________________________________________ Gratis e-mail resten av livet p� www.yahoo.se/mail Busenkelt!