Skip to content

Instantly share code, notes, and snippets.

@Constellation
Last active August 29, 2015 14:17
Show Gist options
  • Select an option

  • Save Constellation/dc75565f3d70e93dd6a2 to your computer and use it in GitHub Desktop.

Select an option

Save Constellation/dc75565f3d70e93dd6a2 to your computer and use it in GitHub Desktop.

There's 3 types.

  • String (1)
  • Symbol
    • Public Symbol (2)
    • Private Symbol (3)

And 2 enumeration modes.

  • Exclude Symbols
  • Include Symbols

Exclude Symbols

Filter out all Symbols. So (2) and (3) are filtered. In that case, hash lookups are not necessary because we just check the target is isSymbol().

Include Symbols

Filter out private symbols. So (3) is filtered. In that case, we need to check with hash lookups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment