No matching definitions.

tur/sym

stdlib/sym.tur

first-class interned runtime symbols (:Sym).

(sym->str :hello)      ; => "hello"
  (sym=? :a :a)          ; => true

Since: Phase SYM4

defn

sym->str

(sym->str [s : Sym] :)

return the embedded name of a symbol (no allocation).

sthe symbol whose name to read

The NUL-terminated UTF-8 name, without the leading colon.

(sym->str :hello)  ; => "hello"

Since: Phase SYM4

defn

sym

(sym [a : Sym b : Sym] :)

pointer-identity equality of two symbols.

athe first symbol
bthe second symbol

true iff a and b are the same interned symbol.

(sym=? :a :a)  ; => true
  (sym=? :a :b)  ; => false

Since: Phase SYM4

definstance

Eq[Sym]

(definstance Eq [Sym])

equality on interned symbols: pointer identity.

definstance

Hash[Sym]

(definstance Hash [Sym])

hash a symbol via its precomputed hash field (a single load).

definstance

MapKey[Sym]

(definstance MapKey [Sym])

interned-symbol pointer carrier. Symbols are deduplicated,