Overview
Zirric is an experimental programming language with a reference implementation in Go. This documentation focuses on how the language feels to use, how the tooling is shaped, and where to dig deeper into the implementation.
It favors small, explicit building blocks: declarations over inheritance, attributes over interfaces, and expression-oriented control flow. The standard library is written in Zirric itself, and the language is designed so Zirric code is easy to reason about.
Zirric is evolving quickly. Expect incomplete features, shifting syntax, and ongoing proposals. Use the proposals as the authoritative roadmap.
Zirric in a nutshell
attr Countable {
length(value: @Countable) -> Int
}
@Countable(fn(v) { return v.length })
data Bag {
items
length
}
fn summarize(bag: Bag) -> Result {
const length = Countable(bag).length(bag)
return if length > 0 {
Ok(length)
} else {
Err("empty")
}
}
Start here
- New to Zirric? Begin with the Getting Started guide.
- Need install instructions? Jump to the Installation page.
- Want conventions before writing code? Read the Styleguide.
Language specification
The language is formally specified in the specification section:
- Syntax — formal grammar reference
- Declarations — declaration forms, scoping, attributes
- Expressions — expressions, control flow, closures
- Type System — types, type hints, type checking
When you want more depth or future-facing design notes, read the Zirric Evolution Proposals.
Runtime and packages
Zirric ships with a standard library written in Zirric itself — from prelude and the collection modules through io, fs and os to reflection, serialization and testing — plus a package system called Cavefile.
- Standard Library — every module, grouped by what it is for
- Cavefile manifests — declaring dependencies and tasks
- Compiler architecture — bytecode and the VM
Tooling
The whole toolchain is one binary. See the Tooling section, starting with the Zirric CLI for what zirric does and Editor Configuration for setting up your editor.
Working on Zirric
If you are hacking on the compiler or VM, the repository README explains the build and test workflow. The docs/ folder is built with docmd and outputs to site/.