Zep is a TypeScript-inspired, statically typed programming language with clean syntax, powerful unions, structural typing, and a focus on developer ergonomics. Designed for simplicity and expressiveness.
- TypeScript-like types: Unions (
A | B), generics (<T>), structural records, type predicates - Clean syntax:
fn name(a: i32): i32 { rt expr },let x = 42,mut count: i32 = 0 - Smart narrowing:
if (x is string) { ... },if (isUser(x)) { ... } - Borrowing & ownership:
&T,&mut T,T*with Rust-inspired safety - Pattern matching: Exhaustive
matchwith guards and destructuring - Go-style errors:
(Result, Error | null)tuples - Attributes:
#[export],#[extern("symbol")],#[inline]
npm install zep zep --help zep run main.zep zep build main.zep
main.zep
#[export] fn add(a: i32, b: i32): i32 { rt a + b } #[export] fn main(): void { let result = add(5, 3) print("Result: ", result) // Result: 8 }
zep main.zep
fn parse(s: string): i32 | null { if (s is empty) { rt null } rt parse_int(s) }
fn process(x: i32 | string | null) { if (x is null) { return } if (x is string) { // x: string here print(x) } else { // x: i32 here print_int(x) } }
struct User { id: i32 name: string avatar: string | null = null }
fn get_length(s: &string): i32 { rt s.length }
# Build from source npm run build # Run tests npm test # Format code npm run format
You can find the language reference here: Language Reference
Full language reference: zep.jairus.dev
Contributions welcome! See the contributing guidelines.
This project is distributed under the MIT License.
Please send all issues to GitHub Issues
- Email: me@jairus.dev
- GitHub: JairusSW/zep
- Website: jairus.dev
- Discord: My Discord or Zep Discord (coming soon)