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:
intdefaults to signed 64-bit, with expliciti8throughu64types when exact width matters andascasts instead of implicit C-style promotions.letbindings are immutable by default,varmarks mutable state, and line breaks end statements without requiring semicolons.- Value structs, fixed-size arrays, growable lists, UTF-8 string slicing and
"$interpolation", and file/line/column compiler errors across imported modules.
I wrote more about the compiler trade-offs in Designing Gable: readable syntax with native compilation. Source is on GitHub.