Jennifer glossary
The project's terminology. Where more than one word could name the same concept (function vs method, library vs module, list vs array), the Term column is the one used everywhere in docs, comments, commit messages, and code identifiers. The other words are listed in Meaning so a search finds this page. Terms are sorted alphabetically.
| Term (singular / plural) | Kind | Meaning |
|---|---|---|
| bool / bools | type | Boolean primitive. Two values: true, false. Comparison operators produce one. |
| break | language | The break; statement; exits the innermost enclosing loop. Misuse outside a loop is a positioned runtime error. Not "leave", "stop". |
| builtin / builtins | implementation | A function or constant registered by a library via the Go-side Register* API. Distinguishes "ships with the interpreter" from user-defined func. |
| bytes | type | Mutable byte sequence. Indexing yields int in [0, 255]; writes accept the same range and reject anything else. Value-typed (deep-copy on assignment / parameter binding). Built from a string via encoding.encode("utf-8", s) or grown from def b as bytes; via $b[] = byte;. Not "buffer", "bytestring", "blob". |
| constant / constants | language | A name bound once at declaration with def const NAME ... and never reassigned. Constants are deep-immutable for lists, maps, and structs. |
| continue | language | The continue; statement; skips to the next iteration of the innermost loop. In C-style for, the step expression still runs before re-checking the condition. Not "next", "skip". |
| defer | language | The defer CALL(args); statement; schedules a single call to run when the enclosing block exits, on every exit path (fall-through, return, break, continue, throw, exit), last-registered-first. Arguments are evaluated at the defer line; the call runs at block exit. Jennifer's cleanup construct - there is no finally. Not "destructor", "finalizer". |
| discard | language | The task.discard($t) call; marks a task fire-and-forget so the exit-time loud-fail scan skips it. One of the ways to observe a task (alongside task.wait and task.waitAll). Not "drop", "detach". |
| errdefer | language | The errdefer CALL(args); statement; like defer but the call runs only when the enclosing block exits with a propagating error (a throw or a runtime error) - skipped on fall-through, return, break, continue, and exit. The undo half of an acquire whose resource must survive on success (a connect handshake). Shares one LIFO teardown stack with defer. |
| Error | type / value | The predefined struct Error { kind, message, file, line, col } that throw conventionally raises and try / catch binds; a runtime error is wrapped into it on entry to a catch. User code may not redefine it. Not "exception", "panic". |
| exit | language | The exit; (code 0) or exit EXPR; (int code) statement. Terminates the whole program; skips every caller frame and remaining top-level statement. Distinct from return (function-scoped) and not catchable by try. |
| float / floats | type | 64-bit floating-point primitive. Mixed int/float arithmetic promotes to float. |
| function / functions | language | A named callable defined with func NAME(...) { ... }. Not "method" or "procedure". The func keyword is the canonical source. |
| global | implementation | A builtin registered via RegisterGlobal / RegisterGlobalConst; reachable as a bare name (no lib. prefix). No shipping library uses it: every library is namespaced, and len is a language keyword. The API remains for tests. |
| import | language | The import "path.j" [as ALIAS]; statement that loads a .j file as a module: a real module boundary with run-once init and ALIAS.member access. Not include (textual splice) or use (system library). |
| include | language | The include "path.j"; statement that textually splices a file's tokens at the include site. Not "import" - import is the module system. |
| int / ints | type | 64-bit signed integer primitive. |
| library / libraries | implementation | A topic-grouped set of builtins shipped inside the interpreter binary, written in Go. Enabled per topic via use NAME;. Not "package" or "module". |
| list / lists | type | Ordered, 0-indexed, mutable sequence. Element type fixed at declaration. Not "array", "vector", "sequence". |
| map / maps | type | Insertion-ordered key→value container, mutable. Key and value types fixed at declaration. Not "dictionary", "hashmap", "object". |
| method | non-term | Not used. Jennifer calls these "functions". The word "method" appears only when discussing other languages' OO methods. |
| module / modules | implementation | A distributable, Jennifer-coded library written in .j source and loaded via import "foo.j"; from the system module directory (or by a relative path). Lives under modules/ in the source tree and ships beside the interpreter binary as .j source. Not "package", "bundle", "plugin". |
| namespace / namespaces | language | The prefix a library introduces at call sites (os.getEnv(), lists.push(...)). Activated by use NAME; or remapped by use NAME as ALIAS;. |
| null | type / value | A type with a single value (null). Returned by bodyless return; and by a function that runs to the end. |
| object | type / kind | An opaque, library-owned value (e.g. json.Value) that carries data reachable only through the owning library's accessors, not through operators or [i] / .field. convert.typeOf reports the generic "object"; convert.objectType the specific registered name. Not "map", "struct". |
| observed | project | A task whose outcome (value or error) has been claimed via task.wait, task.waitAll, or task.discard. Only unobserved error-producing tasks trigger the exit-time loud-fail. Not "seen", "consumed". |
| overlay | project | A white-box test file MODULE_test.j that jennifer test splices after its module, so the tests reach the module's private functions by bare name. Every shipped module carries one that must pass 100%. Not "fixture", "harness". |
| parameter / parameters | language | A function's input slot, declared name as type in the function header. Not "argument" (which is the value passed at the call site). |
| repeat ... until | language | Post-test loop: repeat { ... } until (cond);. Body runs at least once, then until is checked after each pass; loop stops when cond is true. Chosen over do { } while (not cond); so the condition reads as "loop until done". |
| sigil | language | The $ prefix on a variable use site. Marks "read or assign a mutable binding"; constants and functions do not take the sigil. |
| spawn | language | The spawn { ... } block expression. Runs its body concurrently with the rest of the program and returns immediately with a task of T handle. Captures its enclosing scope by deep copy (value-semantics capture). Not "async", "go", "launch". |
| stance / stances | project | One of the eight design rules. Tie-breakers for ambiguous design choices. |
| statement / statements | language | A ;-terminated unit of source: def, assignment, control flow, expression statement, include, import, use. |
| string / strings | type | Immutable text primitive. "..." is cooked (escapes, {expr} interpolation), '...' raw. |
| struct / structs | type | A composite value type with named, typed fields, declared def struct Name { field as type, ... };. Field access via $s.field. Value-typed and deep-const. No methods (see docs/technical/rejected.md). |
| task / tasks | type | A task of T handle to a spawned computation. Wraps either a pending goroutine, a final value, or a final error. Copies share the underlying handle (an exception to value semantics, like channel of T). Observed via the task library. |
| throw | language | The throw EXPR; statement that raises a catchable error (convention: the Error struct). Caught by try / catch. Not control flow - exit / return / break / continue are not catchable. |
| try ... catch | language | try { body } catch (NAME) { handler } runs body, and on a throw (or a runtime error, wrapped into Error) binds the value to NAME and runs handler. No finally, no typed catch. Not "rescue", "except". |
| use | language | The use NAME [as ALIAS]; statement that activates a system library's namespace at the call site. Not the same as include (textual splice) or import (module load). |
| variable / variables | language | A mutable, typed name bound by def NAME as TYPE [init EXPR];. Read and written through the $ sigil. |
When you introduce a term that could plausibly mean different things across documents, add a row here in the same change. When you find an existing doc using a non-canonical synonym ("array" for "list", "package" for "library", "method" for "function"), the fix is to rewrite the doc to use the term in this table, not to add an alias.