stone
a small, general-purpose language for clarity, correctness, and performance
What It Looks Like
Clean syntax, no boilerplate. The compiler resolves types, manages memory, and optimises aggressively.
name = "Alice"
items = [1, 2, 3, 4, 5]
fn square(x) = x * x
fn greet(name) = "Hello, " + namexs = [1, 2, 3, 4]
doubled[i] = xs[i] * 2
// doubled is [2, 4, 6, 8]
// each iteration is independent —
// the compiler can parallelise thissum, count := evolve {sum = 0, count = 0} for (x in xs) {
sum' = sum + x
count' = count + 1
}
mean = sum / countpoint = {x = 3.0, y = 4.0}
dist = sqrt(point.x ^ 2 + point.y ^ 2)
fn magnitude(p) = sqrt(p.x ^ 2 + p.y ^ 2)Design Principles
Stone is a functional language — programs are systems of values, not sequences of side effects.
Expression-Oriented
Every construct produces a value. You compose expressions into results, then direct them to an output.
Immutable by Default
Values cannot be changed after creation. State transitions are explicit declarations through evolve loops.
Static Type Resolution
Full static type safety without the verbosity — everything is resolved at compile time and type annotations are optional.
Structured Iteration
Evolve loops declare their state, update rules, and exit conditions. The compiler sees the full structure at a glance.
No Null, No Exceptions
Functions always return a value of their declared type. No null checks, no exception tables, no surprises.
Performance
Because Stone values don't change, the compiler can safely reorder work, combine loops, process arrays in parallel, and lay out data efficiently in memory. The result is C-level performance from high-level code.
See the full benchmarks or read how Stone is fast.