Jennifer - User Guide
Jennifer is an interpreted programming language with structs, enums and value semantics, lightweight concurrency, a topic-based standard library, and a set of bundled modules written in Jennifer.
This guide covers the whole language. Run jennifer version to see which build you are on.
Design stances
Eight decisions shape every feature and explain why the language looks the way it does. Read the design stances before the topical chapters.
Contents
- Installing & running - building the binary, running a program, the interactive REPL, the inspection and formatting commands.
- Your first program - a one-screen
hello.jand a walkthrough of what each line does. - Editor & AI support - syntax highlighting for your editor, and the drop-in
JENNIFER.mdthat lets an AI assistant write Jennifer. - Syntax - tokens, comments, identifier rules.
- Types and values - the primitive types, variables and constants, scoping rules, and the compound types
listandmap. - Functions - declaring functions, parameters, return values, recursion, hoisting, naming rules.
- Control flow - operators, precedence,
if/while/for/ for-each,match,try/catch,defer. - Concurrency -
spawn,task of T, channels, the loud-fail contract. - Imports -
use LIB;for libraries,includeandimport "file.j";for source files, the requirement header. - Examples - small programs that exercise the language end-to-end.
- Style guide - the canonical source style that
jennifer fmtproduces; the spacing/indentation rules, the names convention, the[]and{}literal layout. - Best practices -
jennifer lint, doc comments, and code-smell heuristics with the reasoning behind each. - Performance - the few patterns that turn a quadratic hot path into a linear one (append-and-join over
+in a loop, hoisting per-element calls out of hot loops), and what the interpreter already optimizes for you.
Related
- docs/libraries/ - one reference page per standard library (
io,convert,math,strings, ...). - docs/modules/ - the Jennifer-coded modules that ship with the interpreter, brought in with
import(ansi,csv,mime,redis, ...). - docs/technical/ - interpreter internals for contributors.
- docs/glossary.md - project terminology: where two words could name the same concept (library vs module, list vs array), the one the project uses.
- docs/milestones.md - what's shipped; docs/roadmap.md - what's planned.