Ek
A Programming Language for the Age of AI Authorship
Core Safety Features
01 Linear Types precedented

Every value is used exactly once. Open a file — you must close it. Allocate memory — you must free it. No garbage collector needed; the compiler tracks usage statically.

02 Capability Tokens precedented

No function can touch the filesystem, network, or hardware without an explicit, unforgeable token in its signature. A function with no capability arguments is provably pure.

03 Bounded Memory precedented

Array and buffer sizes are part of the type, not a runtime check. If the compiler can't prove an operation stays in bounds, it rejects the program before anything runs.

04 Effect System proposed

Every function declares the exhaustive set of ways it can fail, and the compiler forces every caller to handle every declared case. No silent errors, ever.

05 Lens System built

One canonical AST with readable views generated from it. Dedicated symbols mean exactly one thing, always — reducing model ambiguity. See the lenses example below.

Lenses One program, three readable forms. Real is what agents write and the compiler sees. Dev and Normie are views generated from it — never written directly. hover over a keyword to highlight it across all lenses
Real Lens(for AI)models will be trained on this code, not written by humans
Dev Lens(for engineers)
Normie Lens(for humans)