Makoto by example
The progressive book: every chapter builds on the previous one.
Makoto (誠, “sincerity/truth”) is a compiled systems language. It brings together BEAM-style resilience (isolated processes, supervision, let it crash), Go-style concurrency (channels), Rust-style types without lifetimes, and Zig-style comptime/IO-colorless/allocators/FFI-C, all of it without
null, withoutunit, and without function coloring.
This is the progressive teaching material: each chapter builds on the previous one, and every concept
comes with a short, runnable snippet. CLI: mk (alias for makoto). Source: .mko (core) and
.mkoui (UI). Run the examples with mk run file.mko.
Reading order
Section titled “Reading order”| # | Chapter | What you learn |
|---|---|---|
| 00 | Hello, Makoto | the pitch, install, mk run, hello world |
| 01 | Values and types | let/var/const, iN/uN/float/bool/string, Optional (no null), no zero-value |
| 02 | Functions and flow | fn, explicit outputs (return/?:/=>), match, loop |
| 03 | Composite types | decl (struct/enum/interface), pattern matching, variant-set |
| 04 | Errors | Result, error-sets, catch, no ?, noreturn |
| 05 | Collections and strings | List/Map/Set, functional layer, strings and interpolation |
| 06 | Processes and channels | spawn, channels, match/select, timeout, actors |
| 07 | Resilience | supervisors, links, monitors, @supervisor, let-it-crash |
| 08 | Memory | colorless, GC default, @mm, @transfer/@promote, OOM |
| 09 | Network channels | Channel[T] over net, Serializable, the native RPC |
| 10 | Comptime and reflection | comptime, reflect(T), generics, contracts |
| 11 | Interfaces | structural satisfaction, the small interfaces |
| 12 | Modules and ecosystem | bin/lib (mk.mod/mk.project), use, the tiers, official libs, the mk CLI |
| 13 | FFI and low level | @cimport (C), inline asm, the c namespace |
| 14 | UI extension | .mkoui, @state/@component, islands, @server/@client |
| 15 | Tooling in practice | mk build/run/test/fmt, observer/profiler/debugger, package manager |
| 16 | Guarantees | the verification layer: ownership, refinements, sessions, proofs |
How to read
Section titled “How to read”Read in order on the first pass: the progression is deliberate (errors before collections, processes before resilience, comptime before generic interfaces). After that, use it as a reference by topic.
Everything here uses only constructs that exist in the language (source of truth: language-design.md +
language-grammar.md + official_libraries.md + extensions.md + tooling.md). No invented
syntax.