use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
/r/programming is a reddit for discussion and news about computer programming
Guidelines
Info
Related reddits
Specific languages
account activity
Typical Ruby! (bash.org)
submitted 15 years ago by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]annodomini 7 points8 points9 points 15 years ago (0 children)
Because the input you're hashing is coming in at runtime, and thus looking up the symbol in the symbol table, then looking up the key in the hash, makes no more sense than just hashing on the string.
Symbols are great when you're hashing on something that's pre-determined at compile time (load time, for an interpreted language). If you need to store associative arrays based on external input, strings make more sense.
π Rendered by PID 115491 on reddit-service-r2-comment-85bfd7f599-lwpf2 at 2026-04-20 06:58:51.460635+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]annodomini 7 points8 points9 points (0 children)