Module swipl::atom

source ·
Expand description

Prolog atoms.

Atoms are a core datatype in prolog. An atom is a string that is kept around in a lookup table. Each occurence of an atom for the same string points at the same object. This allows for easy comparison.

Atoms are reference-counted. When nothing refers to an atom anymore, the atom may be garbage collected, freeing up the memory of the string.

This module provides functions and types for interacting with prolog atoms.

Structs

  • A wrapper for a prolog atom.
  • A struct which provides a way to delay and cache atom creation.

Enums

  • A type that allows easy conversion of strings from and to an atom.

Traits

  • Trait for types which can be turned into an Atom from a borrow.
  • Trait for types which can be turned into an Atom.

Functions