The names shared across engines. The contract’s files are the authority
on what things are called: a name used in tools/contract/, the
conformance suite, or this glossary is THE name, and every engine’s
identifiers use these nouns under its own affix conventions (x_ and
snake case in C; modules and snake case in Rust). A word that appears in
neither the contract nor this file is engine-private, and stays out of
contract prose, commit messages and reviews.
Choosing a name: the contract’s existing name wins; failing that, the name the library already uses; failing that, the clearer word, whichever implementation coined it. A name states what a thing IS, not what structure it takes; “spine” and “tree” belong only in sentences about layout. The type-system words below carry their standard meanings (Pierce, Types and Programming Languages; ISO C; the Common Lisp HyperSpec), and a classifying noun not listed here has no meaning in this tree.
42 : INTEGER.CLASS, the runtime type of every
class, is one. The word means nothing else here.eval, call,
analyse, read, write, display, and the rest of the families the
type-* routes name.eval
family, the write family. Nothing else is called a family.'io, read by (Err label e); the alternative an analyser
state accepted, written by %score-label!; the type label in an
object’s header; a unit’s ref. Never “tag”, never “kind”. An
assembler’s label, a named position in emitted code, is the word’s
other use, in the JIT and in x-cc.from and to handlers, (Convert to v
target). A coercion is a conversion the language inserts unasked
(count and index seats coerce to INTEGER). A promotion is a
conversion to a type holding every value of the source type (the
numeric tower promotes).(param x T ...) or (returns T ...) doc
form states. T is a runtime type’s name (INTEGER, STRING,
CHARACTER, POINTER, …), a class’s name as spelled (Dict,
Gen), or one of ANY (every value), NUMBER and CALLABLE
(unions), ALIST, TYPE (a runtime type’s handle). Unions are written
INTEGER|BIGINT. Documentation only.x_obj_t, obj-layout.x, Obj,
%obj-*): a storage object, a vector of units laid out as a header
(heap link, type label, flags) and data units; an atom has one data
unit, a pair two. Its contents represent a value, read through its
type label. In the class system (object?, OBJECT): an instance of a
class. Where a passage needs both, it says “storage object” and
“class instance”.ref (a heap object pointer; the collector traces it),
word (an immediate; nothing dereferences it), bytes (a pointer to
bytes the type can measure), foreign (an address C owns). Declared
with (type set-unit-labels!).obj-layout.x and base-layout.x declare
the engine’s.def-class. A class is a type, and is itself a value of
runtime type CLASS.new), or of a runtime type
(Type make-instance).(field 'n), set-field!), a def-record’s components, a leaf of
the base tree or of a runtime type (x_eval_field_*,
x_type_field_*). A class’s own data, declared in (static ...), is
a static field.Obj ref, a runtime
type’s units.def-generic, on) chooses by the types of
several arguments.(extends Other); instance-of?
answers membership along the chain.private, protected or
public.c-type-size, %cc-c-type-of. The head symbol of a C type (ptr,
array, struct, or the scalar itself) is its type category
(C11 6.2.5).'file 'dir 'link
'char 'block 'fifo 'socket 'unknown, the 'file-type key of
(File stat p).base-paths.x and resolved by name. The steps are the engine’s; the
names are the contract’s.((ns . ((method . instruction) ...)) ...), reached by the prims
route.def is top-level, which made a def in tail
position global; a def now binds in the current environment, whatever
the stack says, and eval! evaluates its form in the root whatever
frame called it.(bindings . parent):
the root’s bindings are a tree and its parent nil; every other
environment keeps an alist and the environment it was made in. A call
makes a child; an operative receives the caller’s as a value; eval
with one makes it current.architecture.md names four.features.x. The groups partition the ISA.
Nothing else is called a group.core, gc, posix, full, each including the one before it.(params body . env) for a closure, (params envname body . env)
for an operative, (() () . combiner) for a wrap: a closure with no
parameters and no body, the combiner where the environment goes, which
is where unwrap reads it.element, pair, fold,
binary or thunk. Nothing else is called a shape.(val . (read . write)) cells over
a text, with byte-offset marks.(Str8 length s) counts bytes and overstates
any non-ASCII text, so a byte count wraps lines that would have fit. Not
true display columns either — double-width CJK and zero-width combining
marks need a wcwidth-style table, a known gap (#44 N3). So “width” names
the code-point count wherever the library says it, and the other two
measures are named outright when they are meant. (Fmt width form)
measures a form, (Str length s) a string.StrUtf8 length is O(n),
Dict length O(1).Gen count
(consumes the stream; a lazy stream has no length), Seq count (the
cursor walk the default length delegates to), Heap count (walks the
heap chain), and the verb compounds count-if, match-count,
count-from.(key . val) pair. Assoc find and
Assoc entry answer the assoc itself.((k1 . v1) (k2 . v2) ...): the
associative wire format. Pairing producers (List zip, Gen zip,
Gen enumerate, List group-by, Dict ->alist) emit alists; keyed
consumers (Assoc, Dict from-alist) take them. Keys compare with
eq?.(k v k v ...) form, legal only in option stores.%opt-cell: let-opts, Assoc get-or/opt-get-or/opt-get-or-else,
and object initialisation (new, new-from). Everything else,
Dict and JSON included, is alist-only.((key value) ...) two-element lists, the form
let uses; Assoc from-bindings / Assoc ->bindings bridge it.(step state) -> (value .
next-state), or () when exhausted. Gen is the lazy pipeline over
it, persistent: driving it consumes nothing.[step . state],
driven by (Iter next), which owns the one mutation. Ephemeral,
drained once. (Iter step it) is the functional door back to the
generator view.Vector type the same form with the length exposed.Vector; growth and
in-place mutation: Array.