Specification
Nomi is a fully immutable, functional-first, statically typed language. Types are inferred within a function; function signatures are annotated.
These pages are generated from docs/spec.md in the repository.
| § | Section | What it covers |
|---|---|---|
| 1 | Introduction | Scope and companion documents, Notation and error text, Status callouts. |
| 2 | Lexical structure | Source text, Shebang line, Comments, Naming Conventions. |
| 3 | Literals | Integers, Floats, Decimal literals, String Literals. |
| 4 | Types | Every declared type is named. |
| 5 | Type relations | Type identity, Assignability, Covariant conversion, Annotations and local inference. |
| 6 | Declarations and scope | Top-level declarations, Bindings, Shadowing and redeclaration, once Bindings. |
| 7 | Functions and closures | Function declarations, Parameters, Calls, Lambdas. |
| 8 | Expressions | Expressions, patterns and types nest at most 256 levels deep. |
| 9 | Statements and control flow | Statements and the Unit rule, defer, Releasing resources, break and continue. |
| 10 | Patterns | Taught in Pattern Matching. |
| 11 | Failure | Taught in Pattern Matching. |
| 12 | Interfaces, implementations and derive | Taught in Interfaces and Dispatch. |
| 13 | Iteration | Taught in Iteration and Loops. |
| 14 | Files, modules and imports | Files and modules, Import forms, Short names, Directory imports. |
| 15 | Program execution | Entry point, Scoped application fields, Context. |
| 16 | Concurrency | Every task has an owner: a concurrent block or a supervisor. |
| 17 | Tests | Tests, Groups, Attached tests, Assertions. |
| 18 | Typed literals and keyword declarations | Typed literals, Keyword declarations, Phrases, Embedded files. |
| 19 | Host declarations and Go bindings | Host and foreign declarations, Effects, Binding Go packages: gopkg and go, How Nomi types project to Go. |