Declarations first
Small set of primitives: let, func, data, enum, annotation, module.
Zirric Language
Zirric is a compact language that favors declarations, readable data modeling, and annotations that describe capabilities without interfaces.
Experimental: features and syntax may change.
annotation Countable {
@Returns(Int)
length(@Has(Countable) value)
}
@Countable({ v -> v.length })
data Bag {
items
length
}
@Returns(Result)
func summarize(@Bag bag) {
let length = Countable(bag).length(bag)
return if length > 0 {
Ok(length)
} else {
Err("empty")
}
}
Small set of primitives: let, func, data, enum, annotation, module.
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.