{} blocks for scope, statements terminate at newlines without semicolons, and the language enforces explicit structure to keep large codebases predictable and navigable. If you have written code in any modern statically-typed language, Kairo’s syntax will feel immediately familiar — while its business-domain-first conventions give your code a distinctly readable shape.
Modules and File Structure
Every.ak file declares exactly one module using the module keyword at the top of the file. A module name uses dot-separated Pascal-case segments and should reflect the business or technical domain the file represents.
A file must contain exactly one
module declaration, and it must appear before any imports or declarations. Omitting a module declaration is a compile error.Import Statements
Useimport to bring another module’s public declarations into scope. Kairo does not support wildcard imports — every import names a specific module explicitly.
Import with Alias
When two modules share a common short name, or when you simply want a shorter qualifier, useas to assign a local alias:
Data.SomeType rather than Astra.Data.SomeType.
Type-Only Import
Useimport type when you only need a specific type from a module — for example, to reference it in a signature without pulling in all of the module’s declarations:
Visibility Modifiers
Kairo has three visibility levels. The default — used when you write no modifier at all — isinternal.
private is only valid on members declared inside a type (object or value). You cannot use private on a top-level declaration.Statement Termination
Kairo does not use semicolons. Each statement ends at the newline. This keeps code vertically readable and avoids the noise of trailing punctuation.Keywords and Contextual Keywords
The following identifiers are reserved as keywords and cannot be used as names:File Naming Conventions
Kairo source files use the.ak extension. File names must be lowercase kebab-case:
Keeping file names lowercase and hyphenated makes projects portable across case-sensitive and case-insensitive file systems and avoids ambiguity when multiple developers work on the same codebase.
Putting It All Together
Here is a small but complete.ak file that demonstrates every structural element covered on this page:
