About Elder
Why a new language; what it's for; what it isn't.
What problem Elder is trying to solve
Most languages hardcode their interesting decisions: what operators mean, how short-circuiting works, what a function may return, when an argument is evaluated. Elder's bet is that one uniform construct — the functor, with params in and named members out — can carry all of it: user functions, operators, control-flow keywords, contracts, and package exports share a single invocation surface, and behaviors that are usually grammar (??, short-circuiting, method dispatch) become library code built on defer parameters and receiver-local overrides.
The second bet is about lifetime. The default Elder program boots once, accepts traffic for months, and gets upgraded in place — so the runtime ships what long-lived services actually need: structured concurrency with runtime-enforced data-race prevention, persistent state with atomic commits, capability-gated escape hatches, and package resolution built in. And because the same .ldr artifact runs interpreted or AOT-compiled to a native package, a program can start life as a script and end up a service without a rewrite.
What that looks like in practice
- Sharing is explicit and checked. Values carry concurrency markers; cross-task mutation outside
atomic/mutexis a runtime error in safe code, and ownership primitives (borrow/move/copy/clone) exist in what is otherwise a scripting-friendly language. - Errors are values where it matters.
io/*calls return[ok, …]records; exceptions are reserved for genuine faults. - Low-level power is gated, not banned.
unsafe { }plus capability checks make host access explicit and auditable. - Storage is part of the language. A locked, file-backed store with atomic snapshot commits and per-record CAS ships in the runtime.
- Builds are part of the language. EBBS, the build system that builds Elder itself, is an Elder program. So is the package registry it publishes to.
What Elder is not
- Not a bare-metal language. Elder runs on a C++ runtime; AOT compilation and the native tier keep improving, but zero-allocation hot loops belong in C++ (which Elder calls cleanly).
- A compact type system. Elder uses named types, contracts, and typed collections and optionals such as
list(T)andoptional(T). - Not feature-complete, and honest about it. Pattern matching and a macro system are intentionally unshipped — the functor model has covered what we needed so far — and making the native tier the default is active performance work, not a done deal.
Project status
Production-grade and in heavy production use. The core runtime, concurrency model, package resolution, AOT pipeline, and standard library run the eons stack daily:
- apie — the HTTP server runtime behind every eons web app.
- EBBS — the Elder-native build system (it builds Elder's own packages).
- Constellatus — the package registry that
importresolves against. - FacetFactory — the CMS / page builder serving this very site.
- Tooling —
elder lint/fmt/doctor, the elderdbg debugger (with DAP for VS Code), the elderlsp language server, and cross-language source emitters. See Tooling.
Source and conformance tests
The Elder source checkout contains the interpreter and compiler, the language manual in README.md, and the runnable language conformance cases in test/feature. The language reference names the revision used for this edition.