Hacker News new | ask | show | jobs
by current_call 4196 days ago
It's a bit weird that symbols are garbage collected. I wouldn't think it could delete them without making the same symbols unequal some of the time.
2 comments

They are only garbage collected if they were introduced at runtime and there is no reference to them anymore. (detailed explanations can be found in the presentation linked in the announcement)

This allows you to symbolize external hash keys without fear of a DOS attack.

They're only going to get GCed if there aren't any references to them (like everything else) - so the comparison you're talking about is impossible. If you can still compare the symbol to something, it hasn't been GCed...