Snek is a statically typed, interpreted programming language with Python/Rust inspired syntax, implemented entirely in C.
Snek is a learning project aimed at exploring:
- Language design
- Writing interpreters in C
- Implementing a type system
- Building syntax and semantics from scratch
- Static typing for variables and functions
- Pythonic syntax: indentation, no semicolons
- Rust keywords:
let/const/fn - Expression-based evaluation
- Hand-written parser and interpreter in C
- Designed for simplicity, not full general-purpose use
fn main() -> int:
let x: int = 10
let y: int = x + 2
x +=1
return y