ROX Language

ROX is a minimal, clarity-first programming language built on a simple belief:

Programming logic should not have to fight the language.

ROX removes implicit behavior, hidden conversions, and syntactic tricks so that expressing logic feels direct and mechanical rather than negotiated.

Why ROX Exists

In many languages, expressing simple logic often requires navigating implicit type coercions, silent conversions, operator overloading, hidden control flow, and exception systems.

ROX intentionally removes these. The goal is clarity of expression.

Core Principles (v0)

Example: Two Sum

function two_sum(list[num] nums, num target) -> list[num] {
    num n = nums.size();

    repeat i in range(0, n, 1) {
        repeat j in range(i + 1, n, 1) {

            rox_result[num] r1 = nums.at(i);
            if (not isOk(r1)) { return [-1, -1]; }
            num v1 = getValue(r1);

            rox_result[num] r2 = nums.at(j);
            if (not isOk(r2)) { return [-1, -1]; }
            num v2 = getValue(r2);

            if (v1 + v2 == target) {
                return [i, j];
            }
        }
    }

    return [-1, -1];
}

Notable Properties

Language Features (v0)

Types

Control Flow

Built-in Functions

Math Library

num32

num

float

Constants

Error Model

ROX does not use exceptions. Errors are explicit values:

rox_result[num] r = nums.at(i);
if (not isOk(r)) {
    return [-1, -1];
}
num value = getValue(r);

Nothing throws. Nothing hides.

Download & Build

You can verify and run algorithms locally using the Playground or by building the compiler from source.