Docs menu

Glossary

Words in programming can sound strange. Here is each term used in these docs, in one plain sentence, with a link to the page that explains it properly.

Term Meaning Where
Array A fixed number of values of one type, stored in a row and numbered from 0. Read more
AST Abstract syntax tree: the tree the parser builds from your code, showing how its pieces fit together. Read more
Binary The finished program file the computer can run directly. Read more
Bounds checking The runtime check that an index is inside an array, so reading past the end stops the program instead of reading garbage. Read more
Caller location The compiler feature that makes a library panic name the line of your code that made the bad call. Read more
Codegen Code generation: the last stage of the compiler, which turns the checked tree into machine code. Read more
Compiler The program (turfc) that turns the text of your program into a program the computer can run. Read more
Dependency Another package your project uses. Read more
Diagnostic A message the compiler prints about your code: an error, a warning, a hint or a note. Read more
Enum A value that must be exactly one of a fixed list of named variants. Read more
Error code The label such as E060 on a compiler error. Each one has its own page. Read more
extern fn A declaration that lets Turf call a function written in C. Read more
FFI Foreign function interface: the way Turf calls code written in another language. Read more
Function A named recipe: it takes inputs, does a job, and gives back a result. Read more
Garbage collector The part of the runtime that finds memory nobody uses any more and frees it for you. Read more
Generic A function or struct written once for many types, such as List<T>. Read more
Heap A large pool of memory a program borrows from while it runs. Turf has two: the garbage-collected heap and the manual heap. Read more
immut Declares a variable whose value can never change. Read more
Import A line that brings another module’s names into your file. Read more
Lexer The first stage of the compiler: it cuts the text into words and symbols, called tokens. Read more
Lock file turf.lock: the file that pins exact versions of git dependencies, so everyone builds the same thing. Read more
Machine An enum with a rulebook of allowed moves between its states. Read more
Manifest turf.toml: the file that names a project and lists what it needs. Read more
Method A function called with a dot, as in s.trim(). Read more
Module A file of related functions and types that other files can import. Read more
Monomorphization Making a separate, fully specialised copy of a generic for each type you actually use. Read more
mut Declares a variable whose value can change later. Read more
Operator A symbol such as + or == that does something to values. Read more
Package A named set of modules that can be built into a program, shared as a library, or both. Read more
Panic A bug caught while the program runs. It prints a message and stops the program, and cannot be caught. Read more
Parser The compiler stage that builds a tree from the tokens. Read more
Precedence The order in which operators are applied, as in 2 + 3 * 4. Read more
Prelude The modules Turf loads into every program, so you never import them. Read more
Primitive type A built-in basic type: int, int32, double, bool, char, string or void. Read more
pub Makes a declaration visible to other files. Without it, it is private to its module. Read more
recover Handles a !T result by saying what to do if it is an error. Read more
Recoverable error A failure the caller can handle, reported by returning an error in a !T. Read more
Reference A safe pointer, written &T (never null) or &?T (may be null), which the compiler checks. Read more
Resolver The compiler stage that works out what every name refers to. Read more
Runtime The small support library, libturfrt, linked into every compiled Turf program. Read more
Stack The tidy pile of memory for the function that is running now, discarded when it returns. Read more
Standard library The ready-made modules that come with Turf. Read more
Struct Several named values bundled into one. Read more
try Passes an error on to the caller instead of handling it here. Read more
Type The kind of value a variable can hold. Read more
Type checker The compiler stage that checks every value has the right type. Read more
Type inference The compiler working out a variable’s type from its starting value. guess asks for it. Read more
UFCS Uniform function call syntax: calling a function as a method, so f(x) can be written x.f(). Read more
unsafe The marked area where the compiler stops checking for you. Read more
Variable A named place that holds a value. Read more

Last updated: Oct 15, 2026Edit this page on GitHub

Esc

Type to search.