Language guide
Start with expressions and bindings, then add functions and data models. Each chapter introduces a small set of ideas you can try in the playground, a script, or the REPL. Use Run or Debug on a KataScript example to open its editor; click a recognized token for a short explanation and reference link.
- Syntax and values — comments, literals, operators, and expression blocks.
- Bindings and scope — names, reassignment, shadowing, and destructuring.
- Functions and closures — parameters, returns, and captured state.
- Types and data — products, sums, tuples, and generics.
- Methods and interfaces — behavior attached to types.
- Control flow and patterns — decisions, loops, and matching.
- Strings and bytes — text, interpolation, Unicode, and binary data.
- Collections — arrays, maps, indexing, and iteration.
- Modules and errors — library imports and explicit failure.
After the guide, choose a tutorial to assemble a complete program. If you already know what you need, use the language reference for a focused lookup.
One program to orient yourself
Section titled “One program to orient yourself”func classify(n: Int): Str { ret if n % 2 == 0 { "even" } else { "odd" }}
for n in [1, 2, 3] { print("{n} is {classify(n)}")}This program combines a typed function, an expression-valued conditional, an array, a loop, and string interpolation. There is no import because arrays and their iterator support arrive through the prelude.
KataScript’s type annotations are runtime checks, not a separate static compilation pass. Its collections and lifetime behavior are still being developed. Keep the current limits nearby while experimenting.