Skip to content

FR: add symbol/reference module or similar #916

@acandoo

Description

@acandoo

Currently there's no cross-platform way of denoting a globally unique value across runtimes. gleam_javascript can make JavaScript symbols, while gleam_erlang allows for making unique Erlang references. A simple module that allows creating the core concept of a unique value would be nice. The module would expose an external type, Symbol or Reference or Unique or Special or whatever the name would be, as well as a new() function that creates a new value. Equality between two separately "instantiated" symbols or references would fail. I feel like the language-specific constructs are similar enough to have some sort of shared concept in the standard library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions