Documentation menu
Documentation

Serez Code

Serez Code is a modern, general-purpose programming language designed for clarity, safety, and performance. If you know JavaScript, Python, Rust, or C#, you'll feel at home in minutes.

It runs scripts directly from source, features an interactive REPL, ships with a built-in package manager, and compiles to native standalone binaries. Types are optional — add them where precision and contract enforcement matter, or omit them where they don't. There is no tracing garbage collector and no manual heap freeing: memory is managed through scope-based arena regions. Leaving a scope releases its memory in a single efficient step without GC pause spikes. To explicitly control memory lifetimes for large temporary allocations, you open a Flash Scope.

Run
// Write a script and run it
let name = "world"
out "Hello, {name}!"   // → Hello, world!

Where to start

Built-ins & Runtime Capabilities

The sections above cover the core language semantics. All operational interactions — reading the disk, executing external processes, opening native windows, raw network sockets, or training neural networks — are organized into built-in runtime namespaces:

A taste of the language

Run
// Variables, types, and const
let count: int = 0
let message = "hello"
const MAX = 100

// Functions with optional type annotations
fn int add(int a, int b) {
    return a + b
}

// Arrow functions
let double = int (int n) => { return n * 2 }

// Arrays with functional transformers
let nums = [1, 2, 3, 4, 5]
let evens = nums.filter(x => x % 2 == 0)   // [2, 4]
let doubled = evens.map(x => x * 2)        // [4, 8]

// Dicts require parenthesized entry syntax and type annotations
let scores <string, int> = ({"Alice", 95}, {"Bob", 88})
scores.Charlie = 92
out scores["Alice"]   // → 95

// Classes with constructors and methods
public class Point {
    public Point(decimal x, decimal y) {
        this.x = x
        this.y = y
    }
    public decimal distanceTo(Point other) {
        let dx = this.x - other.x
        let dy = this.y - other.y
        return Math.sqrt(dx * dx + dy * dy)
    }
}

let a = new Point(0.0, 0.0)
let b = new Point(3.0, 4.0)
out a.distanceTo(b)   // → 5.0