The Language Built for Precision
Statically compiled. LLVM-powered. Every construct is deterministic, with no surprises.
- LLVM
- Backend
- 180+
- Stdlib APIs
- 4
- Loop Forms
- v3.1.0
- Feature Complete
Clean, precise, unambiguous
# primitive types
int x = 42
double pi = 3.14
long timestamp = 326293729283L
byte b = 255B
string name = "zen"
bool flag = true
# type inference
auto result = x * 2
# constants
const int MAX = 1000
# reactive (re-evaluates on change)
reactive string msg = `val: ${x}`
# typed function
fn add(int a, int b) int {
return a + b
}
# auto return type
fn greet(string name) auto {
return `Hello, ${name}!`
}
# rest parameters
fn sum(int vals...) List<int> {
return vals
}
# normal loop
loop (int i = 0, i < 10, i++) {
screen(i)
}
# while
while (x > 0) { x-- }
# do while
do {
screen(x)
} while (x > 0)
# iterate List, fixed size arrays or rest params
loop (n of nums) {
screen(n)
}
# typed list
List<int> nums = [1, 2, 3]
nums.push(4)
int len = nums.length
# map
Map person = {
name: "Jishith",
age: 25
}
bool has = person.has("name")
person.remove("age")
struct Point {
int x = 0
int y = 0
private int id
sum() int {
return x + y
}
}
# declare only, unmangled C symbol
extern fn getpid() int
extern fn abs(int n) int
# thread function
threads fn worker(int a) void {
screen(a)
}
threads.waitAll()
Designed with intent
LLVM Backend
Compiles directly to LLVM IR, giving you native performance with access to decades of compiler optimization work.
native binaryCompile-Time First
Type resolution, semantic checks, and error detection happen at compile time. Bounds and key access are caught at runtime with precise error messages.
no silent failuresModule System
Clean export/import model with strict ordering rules. No circular dependencies, no ambiguous resolution.
explicit exports180+ Stdlib APIs
Math, strings, I/O, HTTP, time, regex, JSON path navigation, terminal colors. Batteries included.
stdlib v3Reactive Variables
Declare variables that automatically re-evaluate when their dependencies change. First-class language feature.
reactive keywordSelf-Hosting in Progress
The Zen lexer is already written in Zen itself. Full compiler bootstrap is underway.
bootstrappingNative FFI
Bind C and libc functions with extern fn using their unmangled names. No wrappers required.
JSON Types
Dedicated Json, JsonObject and JsonArray handles for parsing and reading JSON data.
Package Manager
Import packages by name, including native-backed packages configured through a zen.json manifest.
Defined type conversions
Numeric types promote by fixed rules, and any operand joined to a string with + produces a string. Nothing else converts silently.
No hidden transformations
No magic behind the scenes. Every operation has a deterministic IR output.
Programmer and compiler agree
The spec is the truth. Behavior is never undocumented or implementation-defined.
Native speed, minimal runtime
Compiles to Native Binary
Zen emits LLVM IR and compiles to a native binary. No VM, no interpreter, no JIT warmup.
minimal overheadNo Garbage Collector
Memory is managed explicitly with free(). Predictable performance, no GC pauses.
LLVM Optimizations
Leverages the full LLVM optimization pipeline: inlining, dead code elimination, and target-specific codegen.
llvm backendShip your first Zen program
Then run: zen run main.zen