string: What is the use of the symbols as hash keys in Ruby ?
Using symbols save both the time and memory for the user:
Symbols in Ruby is more essentially “immutable strings” .. meaning that they’ll not be modified, and it implies that constant image once documented again and again throughout our ASCII text file, is usually keep because the same entity, e.g. has constant object id.
Strings on the opposite hand is more changeable, they’ll be modified anytime. this means that Ruby has to store every string you mention throughout our ASCII text file in it’s separate entity, e.g. if we’ve got a string “name” multiple times mentioned in your ASCII text file, Ruby has to store these beat separate String objects, as a result of they could amendment anon (that’s the character of a Ruby string)