Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate the getSymbol function in the String module #80

Open
aspeddro opened this issue Mar 2, 2023 · 2 comments
Open

Investigate the getSymbol function in the String module #80

aspeddro opened this issue Mar 2, 2023 · 2 comments

Comments

@aspeddro
Copy link
Contributor

aspeddro commented Mar 2, 2023

The String module has three functions for interacting with Symbols.

  1. getSymbol
  2. getSymbolUnsafe
  3. setSymbol
  • Are these bindings necessary?
  • Should we move to another module?

Is there any example case for these bindings?

String.getSymbol("name", Symbol.make("name"))

Compile to:

"name"[Symbol("name")]

#27 (comment)
#27 (comment)

@glennsl
Copy link
Contributor

glennsl commented Mar 2, 2023

These are also in Array. I touched on it briefly in #51, suggesting that they should be named getBySymbol and setBySymbol instead. But good to question their usefulness first.

@jmagaram
Copy link
Contributor

Oh I see you already raised this issue. I agree the naming is confusing and should be getBySymbol everywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants