Declarations first
Small set of primitives: let, fn, data, union, attr, mod.
Zirric Language
Zirric is a compact language that favors declarations, readable data modeling, and attributes that describe capabilities without interfaces.
Experimental: features and syntax may change.
attr Countable {
@Returns(Int)
length(@Has(Countable) value)
}
@Countable({ v -> v.length })
data Bag {
items
length
}
@Returns(Result)
fn summarize(@Bag bag) {
let length = Countable(bag).length(bag)
return if length > 0 {
Ok(length)
} else {
Err("empty")
}
}
Small set of primitives: let, fn, data, union, attr, mod.
if and for return values when you need them, so data flow stays explicit.
Capabilities are declared, composed, and exposed to tooling.
Records and tagged unions stay close to the domain and are easy to reason about.