Skip to content

MLangA Math-First Programming Language

Statically typed and expressive. Write clean scripts with native structs, functions, and I/O — no boilerplate.

A taste of MLang

mlang
struct Point {
    int x
    int y
}

int distance_sq(Point a, Point b) {
    int dx = a.x - b.x;
    int dy = a.y - b.y;
    return dx * dx + dy * dy;
}

main() {
    Point p1 = Point { x = 0, y = 0 };
    Point p2 = Point { x = 3, y = 4 };
    print(distance_sq(p1, p2));   # 25

    txt name = read("Your name: ");
    print("Hello, " + name);
}

Install

bash
curl -fsSL https://lizzyman04.github.io/mlang/install.sh | sh

Released under the MIT License.