Introduction · July 30, 2026
Intro to Range
The basic building blocks of the graph
Range begins with one base concept: Identity : Value. It is the smallest unit of meaning in the graph. Nothing smaller is tracked.
Lowering can represent the two sides of Identity : Value separately, and that separation is where full control over the architecture comes from. But the meaning never splits.
Without identity there is only value | no value | many values—never this value.
Range keeps its concrete substrate small. Construct describes composed values, Enum describes alternatives, and Function describes the logic between them. Together they account for shape, choice, and behavior without introducing a new kind for every pattern.
construct Point {
let x: Int
let y: Int
}
enum Direction {
case north
case east
case south
case west
}
function clamp(value: Int, min: Int, max: Int): Int {
if value < min { return min }
if value > max { return max }
return value
}Range names each storage and access relationship directly. Before we read a body, the declaration tells us whether a value is immutable, mutable, projected, or computed:
construct Counter {
let seed: Int // immutable · owned storage
state count: Int // mutable · owned storage
binding source: Int // read/write · projected access
derived total: Int { // read-only · computed access
self.seed + self.count
}
}Many languages make a coarse type-level choice—class or struct—before individual properties are considered. Range moves that choice onto each property’s storage and access relationship, making the resulting representation more composable.
Those forms describe the source itself: its shape, alternatives, and behavior. This is where the concrete vocabulary ends. Macros begin one layer above, receiving source structure as input and returning a transformed execution graph.
- @equatable
- @codable
- @comparable
- @hashable
- #environment
- @background
- @component
- @app
- @page
- @modifier
- @project
- @package
- @command
- @module
- @commandGroup