Gable

Gable is an open-source, statically typed programming language I am building under Undrocs.

It is still pre-1.0. The compiler is written in C++ with a handwritten lexer, a recursive-descent and Pratt parser, program-wide type checking, and native binary output across multi-file .gable projects.

fn add(a: int, b: int) -> int {
    return a + b
}

fn main() {
    let result = add(20, 22)
    print("Hello from Gable!")
    print("20 + 22 = $result")
}

What works today:

I wrote more about the compiler trade-offs in Designing Gable: readable syntax with native compilation. Source is on GitHub.


Linked mentions