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.

Experimental

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

Language specification

The language is formally specified in the specification section:

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.

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/.