library(record), which generates access predicates for a term using positional arguments from a description.
library(assoc)which represents the associations as a balanced binary tree.
This situation is unfortunate. Each of these have their advantages
and disadvantages. E.g., compound terms are compact and fast, but
inflexible and using positional arguments quickly breaks down. Library
library(record) fixes this, but the syntax is considered
hard to use. Lists are flexible, but expensive and the alternative
key-value representations that are used complicate the matter even more.
library(assoc) allows for efficient manipulation of
changing associations, but the syntactical representation of an assoc is
complex, which makes them unsuitable for e.g., options lists as
seen in predicates such as open/4.
Although dicts are designed as an abstract data type and we deliberately reserve the possibility to change the representation and even use multiple representations, this section describes the current implementation.
Dicts are currently represented as a compound term using the functor
`dict`. The first argument is the tag. The remaining
arguments create an array of sorted key-value pairs. This representation
is compact and guarantees go