leviathan-lang.com

A statically-typed language, built from first principles.

Coming Soon

Leviathan is in active development. This page will grow alongside it — for now, here's a preview of what's taking shape.

What is Leviathan?

Leviathan is a new statically-typed, object-oriented language, drawing on ideas from C++, C#, TypeScript, and Haskell. It's being designed around a simple conviction: most of what looks like a language's "special case" is really just a general rule nobody has bothered to find yet. Leviathan tries to find that rule, instead of adding another exception.

The result leans explicit over implicit, treats safety as the default rather than an opt-in, and still keeps a clearly marked door open for the rare moment you need to reach for raw power. It's early — the compiler, standard library, and tooling are all being built in the open, one deliberate decision at a time.

Design Highlights

01

One Rule, Not a Pile of Exceptions

Constructors, operators, and properties aren't special syntax — they're all just typed members. The same rules govern everything.

02

Multiple Inheritance, Solved

Inherit from more than one class without the classic diamond-problem headaches. Collisions are caught automatically and resolved explicitly, member by member.

03

No Null. Ever.

Absence is a real, typed value instead of a landmine hiding in every reference. Your code can't quietly forget to check for it.

04

Safe by Default, Powerful on Purpose

The everyday path is guarded and predictable. Raw power still exists — it just requires you to reach for it deliberately.

05

Pattern Matching, Built In

Branch on type or value with one readable construct, instead of a chain of if/else and manual casts.

06

One Boundary for the Outside World

Files, sockets, timers, and everything else that talks to the outside world flows through one consistent idea: the stream.

A Taste of the Syntax

Leviathan is still taking shape, but here's a small sample of what writing it actually looks like.

Every primitive is an object

No boxed wrapper types — numbers and strings carry real methods, unboxed.

(-7).abs()            // 7
"Hello".toUpper()     // "HELLO"
(42).toString() + "!" // "42!"

Multiple inheritance, without the headaches

Colliding members from different bases stay separate, explicitly, instead of silently merging or refusing to compile.

class Counter { public distinct int value = 0; }
class Tag     { public int value = 99; }

class Widget : Counter, Tag {
    new Widget() {
        this.Counter::value = 5;   // two distinct 'value' slots —
        this.Tag::value     = 7;   // no diamond problem, no ambiguity
    }
}

Pattern matching, not a chain of ifs

Match on type or value with one readable construct, exhaustively checked at compile time.

string describe(IShape sh) => match (sh) {
    Circle => "circle";
    Square => "square";
    else   => "shape";
};

No null — just an honest maybe

T? is sugar for a real union with None — absence you can't forget to handle.

string? token = request.header("Authorization");
console.writeln(token ?? "none provided");

Follow Along

Leviathan is being built in the open. This page will keep growing as the language does — check back at leviathan-lang.com for updates.