Saule is a statically typed, class-oriented scripting language. It reads like
Lua and checks like a typed language: every parameter and field states its
type, nil is a thing a type opts into rather than a value any slot can hold,
and the compiler reports what it found before anything runs.
This page is the index. If you are starting from nothing, read
Introduction and then
Your First Program — about fifteen minutes
together. If you are here to look one thing up, the
Quick Reference and the
Grammar are the two pages that answer most
questions without reading prose.
Fifteen pages covering the whole language, in the order they build on each
other. Each one is worth reading end to end once; afterwards they work as
reference.
Typesinteger, float, string, bytes, byte, boolean, any — and why integer and float never mix implicitly.
Variableslocal bindings, module variables, inference, and the rule that a non-nullable slot can never start empty.
TablesOne structure, two jobs: 1-based arrays and typed maps, with element types that are invariant.
FunctionsDefaults, named arguments, multiple returns, variadics, generics and the when(...) pipeline.
Lambdas and ClosuresArrow lambdas, inferred parameter types, captured state, and trailing blocks.
ClassesFields, methods, visibility, static members, inheritance and overriding.
InterfacesContracts a class fulfils, including the Op* family behind operator overloading.
EnumsPlain variants, valued variants, payloads, methods and generic enums.
Pattern Matchingmatch as a statement and an expression, with guards and exhaustiveness checking.
Null SafetyT?, ?., ?[ ], ?? and ! — how absence is expressed and how the checker makes you handle it.
Error Handlingthrow, try, several catch clauses, finally — and when a nullable return is the better answer.
LoopsNumeric for, for-in over tables and iterables, while, repeat-until, break and continue.
CoroutinesFunctions that pause with yield and resume where they stopped — typed as Coroutine, stackful, and iterable.
Imports and File Structureexport, import, folder modules, visibility across files, and why circular imports are refused.
Project Configurationsaule.config: entry points, source roots, dependencies and the minimum toolchain version.