Registry

From Esolang
Jump to navigation Jump to search

A Registry is the most common data model used in computing for non-esoteric languages, but is rarely used in esolangs.

Operations

A traditional registry consists of a number n-1 (usually where log2(n)∈ℕ) of "registers" that, when using unsigned integers, can hold any value from 0 to m where m≥n. Less traditional registries have dynamic type, but still must be able to map all registers to a value.

Interaction

The following table lists operations used for interacting with a registry, including the operation, its name, its meaning, and an example in "Generic Registry Language" (GRL), a language used solely for example purposes.

Op Name Meaning GRL
SET r v Set Set Regs[r] to v REGS[r]←v
MOV r1 r2 Move Set r2 to the value held in r1 REGS[r1]←REGS[r2]