Why YEN?
YEN is designed for developers who want the performance of systems programming with the expressiveness of modern languages. It combines zero-cost abstractions, memory safety without garbage collection, and a powerful type system.
Features
Pattern Matching
Powerful pattern matching with guards, ranges, and destructuring for expressive code flow control.
Zero-Cost Abstractions
High-level features that compile down to efficient machine code with no runtime overhead.
Memory Safety
RAII-style defer statements and ownership system prevent memory leaks and data races.
LLVM Backend
Compile to native executables with world-class optimizations from the LLVM compiler infrastructure.
Rich Standard Library
12+ modules including IO, networking, crypto, encoding, and system operations out of the box.
Dual Execution
Fast iteration with the interpreter or deploy with the AOT compiler for maximum performance.
Getting Started
1
Clone Repository
Get the latest version from GitHub
git clone https://github.com/yen-lang/Yen
2
Build
Compile using CMake
mkdir build && cd build
cmake .. && make
3
Run
Execute your first program
./yen hello.yen
Code Example
hello.yen
// Pattern matching with ranges and guards
match (score) {
0..60 => print "F";
60..70 => print "D";
70..80 => print "C";
80..90 => print "B";
90..=100 => print "A";
_ => print "Invalid";
}
// Lambda expressions with closures
var multiplier = 10;
let multiply = |x| x * multiplier;
print multiply(5); // 50
// RAII-style resource management
func process() {
defer print "Cleanup!"; // Executes on scope exit
// ... work ...
}
// Shell command execution
var files = process_shell("ls -la");
print files;
// File I/O
var content = io_read_file("data.txt");
var lines = str_split(content, "\n");
for line in lines {
log_info("Processing: " + line);
}
Documentation
Language Syntax
Complete reference for YEN's syntax, from variables to advanced pattern matching.
Read Docs →