leviathan-lang.com / docs
Leviathan Documentation
Leviathan is a statically-typed, object-oriented language built from first principles — one rule where other languages pile up exceptions. These docs come in two halves: a hands-on tutorial that teaches the language front to back, and a complete reference organized by feature category, with a runnable example for nearly every entity.
A guided tour from your first program to
classes, pattern matching, concurrency, and shipping a real project
with trident.
Precise, category-by-category specification of syntax, semantics, and the standard library as implemented today.
The reference, by category
Every page below documents one family of features and shows it in use.
Comments, identifiers, keywords, and every literal form — numbers, strings, chars, arrays, ranges.
Foundations Types & GenericsPrimitives as objects, unions and optionals, var/let, value vs reference, generics and HKT.
Precedence, calls, member access, method dispatch, match, and operators as methods.
Classes, interfaces, multiple inheritance, and distinct collision resolution.
Fields, methods, constructors, operators, get/set views, and the const/readonly/weak axes.
Value structs, enums over a closed member set, and columnar storage.
Declarations Namespaces & InjectionNamespaces, use/uses imports, and bind/inject dependency injection.
Declarations, loops, match, and loop control — break, continue, do-while.
Exceptions, the IException hierarchy, using, and IDisposable cleanup.
Pure Array, Map, Set, Pair, Range, the iterator protocol, and lazy Seq.
The string toolkit, char and UTF-8, StringBuilder, and the linear-time regex engine.
Promise, await and tasks, workers and channels, cancellation and TaskGroup.
The stream boundary, files, sockets, HTTP, TLS, timers, and child processes.
Library JSON, Time & Bytesjson, DateTime/Duration, encoding & digests, math, and the Block byte buffer.
Attributes, rules, comptime, body-replacing rewrites, and procedural macros.
The leviathan compiler, backends, and trident — manifests, dependencies, and packages.
Leviathan is under active development. The reference tracks the language as implemented; anything designed but not yet built is marked planned. Where a feature runs on some compiler backends and not others, that's called out too.