Elder

A general-purpose language where everything is a functor — structured concurrency, persistent state, and one artifact that runs as a script, a typed program, or an AOT-compiled native package.

Read the language tour

What Elder is for

Elder is a general-purpose programming language and runtime for the kind of code that runs for years: web servers, build systems, registries, daemons, and the tools around them. It pairs a compact surface — functors, records, contracts, modules — with a runtime that takes concurrency, persistence, and packaging seriously, so a single program can hold its own as a long-lived service without a framework per dependency. It is the primary language of the eons stack, and the stack is written in it.

What it looks like

Typed parameters give a functor a checked input contract. This one accepts a list of numbers.

// A functor's params are its inputs; every member it binds is an output.
// Call it without `return` and you get the instance back — one call,
// several named results.
stats::(xs: list(number))
{
    total: number := 0
    count: int := xs/length
    for (xs) [x] { total = total + x }
    mean := if (count > 0) { total / count } else { null }
}

s := stats([2, 4, 6])
print "mean {s/mean} over {s/count} values"   // → "mean 4 over 3 values"

// `return` opts into single-value semantics when that's all you need.
half::(x: number) { return x / 2 }
print half(9)                                  // → 4.5

Why a new language

Where it is today

Elder is production-grade and in heavy production use across the eons stack: the apie web server, the EBBS build system, the Constellatus package registry, the FacetFactory CMS, and real web applications (including this site) are written in it. Tooling is real, not aspirational — elder lint, elder fmt, a debugger with DAP support, an LSP server, and cross-language source emitters ship today.

We are equally clear about what is not there yet: pattern matching and a macro system are intentionally unshipped, installation is from source while broader distribution is prepared, and the performance work to make the native tier the default is in progress.

Language reference Install Elder