Unpopular opinion: symbols are over-used in Ruby. They are strictly an optimization that adds no semantics over the equivalent string. Most of the places they are used, the optimization doesn't matter so they just add a layer of extra "wait, which do I use?" overhead for newbies.
Yes, they are more efficient for Hash lookups, which is basically why they exist. Does this matter most of the time? No. Not enough to make them the default.
Better would be a SymbolHash subtype that you can swap in when lookups are happening a bajillion times per second. It would use symbols internally and IF you replaced lookup keys with symbols, it'd be super fast. But would still work with string key lookups too.
You can follow @avdi.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: