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.
Currently there's no cross-platform way of denoting a globally unique value across runtimes.
gleam_javascriptcan make JavaScript symbols, whilegleam_erlangallows 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,SymbolorReferenceorUniqueorSpecialor whatever the name would be, as well as anew()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.