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 tourWhat 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.5Why a new language
- Named types for known data. Declare a closed type with typed fields and use typed collections for repeated values. The receiving binding or parameter checks the value.
- Everything is a functor. Operators (
+,/,??) and control-flow keywords are functors you can override — a type gets vector addition by defining+::(other), not by waiting for new grammar. - Multiple outputs per call. A functor's members are named outputs;
returnis the opt-in for single values, not the only way out. - Short-circuiting is a library concept.
deferparameters are call-by-need: the argument runs only if the callee reads it.??and friends are ordinary functors built on it. - Concurrency with enforcement.
task_group,atomic,mutex,channel,actor— and unsynchronized cross-task mutation in safe code is a runtime error, not a latent data race. - Persistent state is built in. A file-backed store with atomic commits, plus per-record
store/*with revision-based compare-and-swap. - One artifact, the whole gradient. The same
.ldrsource runs interpreted for iteration speed, then AOT-compiles to a native package — script to service without a rewrite.
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.