Skip to content

The book · 00

Hello, Makoto

book.md · 66 lines · 2 min read

Goal: understand why Makoto exists, install the toolchain, and run your first program.

Makoto combines four bets that normally come separately:

  • BEAM resilience (Erlang): isolated processes, structural supervision, let it crash. A process that fails does not corrupt the rest.
  • Go concurrency: spawn creates cheap processes; they talk to each other over typed channels.
  • Rust types, without lifetimes: sum types, generics, exhaustive pattern matching, without the borrow checker and without 'a infecting signatures.
  • Zig comptime: metaprogramming in the language itself, arbitrary-width integers, first-class FFI-C, IO without coloring.

And three “nos” that define the language’s character:

  • No null: absence is Optional[T], explicit in the type.
  • No unit/void: a function that does not return a value simply has no -> T.
  • No function coloring: there is no async; the scheduler suspends the process on IO, and no function needs to be marked.

The philosophy, in one sentence: consistent, not simple. You only pay for what you summon.

The toolchain is a single binary, makoto, with the alias mk. Core source files end in .mko.

ola.mko
use io
fn main() {
io.println("Hello, Makoto!")
}
Terminal window
mk run ola.mko // compile and run
mk build ola.mko // just compile → binary

Notice a few things that already show up in hello world:

  • use io: there are no functions in global scope. Even println is imported (print lives in io, panic in runtime). Whoever does no IO never sees io.
  • main has no -> T: it does not return a value. With no void, the absence of -> is the absence of a return.
  • "{{ }}" will show up in the very next program: string interpolation.
use io
fn main() {
nome := "world"
io.println("Hello, {{nome}}!") // interpolation via {{ }}, through the Display interface
}

nome := "world" declares an immutable value (the common case carries no ceremony). In the next chapter we break down declaration, the primitive types, and why there is no null.

Next: 01 · Values and types