The Desi Book¶
A Modern, Python-Inspired Systems Language
Version 0.1.0
What is Desi?¶
Desi is a programming language that combines the elegance of Python with the performance of systems languages. It's designed for developers who want:
- 🐍 Python-like syntax - Familiar, readable, productive
- ⚡ Native performance - Compiles to LLVM, runs fast
- 🔒 Memory safety - Arena allocators, RAII, no garbage collector
- 🎯 Type safety - Strong typing with inference
Quick Example¶
A more interesting example:
class Counter:
pub mut count: int
pub def __new__(self, start: int):
self.count = start
pub def increment(self):
self.count = self.count + 1
pub def get(self) -> int:
return self.count
def main():
let c = Counter(0)
c.increment()
c.increment()
print(c.get()) # Prints: 2
Why Desi?¶
For Python Developers¶
If you love Python but need more performance, Desi gives you:
- Same indentation-based syntax
- Similar class and function definitions
- Native compilation instead of interpretation
For Systems Programmers¶
If you need low-level control but want better ergonomics:
- No manual memory management (arenas handle it)
- Rich standard library of builtins
- Modern language features (generics, pattern matching)
Getting Started¶
Ready to try Desi? Start here:
| 📥 Installation | Install Desi on your system |
| 🚀 First Program | Write your first Desi program |
| 📖 Tutorials | Learn Desi step by step |
Language Features¶
| Feature | Description |
|---|---|
| Variables | let and let mut with type inference |
| Functions | def with optional type annotations |
| Classes | Full OOP with inheritance, methods, properties |
| Generics | Type parameters for classes and functions |
| Collections | Lists, dicts, sets with Python-like syntax |
| Pattern Matching | match expressions with exhaustive checking |
| Error Handling | Option and Result types with ? operator |
Status¶
Version 0.1.0 is the first release. Desi is under active development.
0.x means the language can still change
Desi follows semantic versioning, and a leading zero is a promise in its own right: the surface language may change between 0.x releases. Code written today may need small edits to compile against 0.2.0.
What will not change under you is the memory model. No use-after-free and no double-free in safe code, and where the compiler cannot prove ownership it leaks rather than guesses — see the memory model for exactly what that does and does not cover.