Symbols Ruby में hash keys के लिए conventional और preferred विकल्प हैं क्योंकि वे memory-efficient हैं (interned — एक shared object) और compare करने में तेज़ हैं (identity द्वारा)। Symbol keys का उपयोग idiomatic Ruby है और Rails जैसे frameworks में standard है।
Symbol keys बनाम string keys
user = { , , }
user[]
user = { => , => }
user[]
