Skip to content

Investigate the getSymbol function in the String module #80

Open

Description

@aspeddro

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)

Activity

  1. glennsl commented on Mar 2, 2023

    @glennsl
    Contributor

    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.

  2. jmagaram commented on Mar 22, 2023

    @jmagaram
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions