Language Philosophy
Zith was created with clear principles that guide every design decision.
Why Zith Exists
Zith was born from a simple observation: systems programming languages had become either too complex or too unsafe.
The Gap We Fill
| Language |
Safety |
Complexity |
Verdict |
| C |
|
Low |
Unsafe but simple |
| C++ |
|
Extreme |
Complex, legacy baggage |
| Rust |
|
High |
Safe but steep learning curve |
| Zig |
|
Moderate |
Good balance, limited features |
| Zith |
|
Low-Moderate |
Safe AND accessible |
Core Design Principles
1. Clarity Over Cleverness
Every language feature should be immediately understandable:
fn process(self: lend Health, dmg: view u16) {
// 'lend' = exclusive mutable borrow
// 'view u16' = read-only reference
}
2. Progressive Complexity
- Level 1: C-like syntax for beginners
- Level 2: Components and entities for game dev
- Level 3: Contexts for DSLs and advanced metaprogramming
3. Zero Runtime Overhead
- No garbage collector
- No hidden allocations
- No runtime type information (unless explicitly requested)
4. Explicit Is Better Than Implicit
Ownership, mutability, and effects are visible in types:
var data: [i32] = [1, 2, 3];
let ref: view [i32] = data; // Read-only borrow
let mut_ref: lend [i32] = data; // Exclusive mutable borrow
5. Safety Without Punishment
- Clear error messages with suggestions
- Gradual learning curve for ownership
- Escape hatches when needed (
unsafe blocks)
Trade-offs We Made
What We Gained
- Accessibility: Easier to learn than Rust
- Expressiveness: Rich feature set for complex domains
- Performance: Zero-cost abstractions
- Safety: Compile-time guarantees without GC
What We Accepted
- Smaller ecosystem: Growing, but not as large as Rust/C++
- Less proven: Newer language, fewer battle-tested projects
- Tooling maturity: Improving rapidly but still developing
Our Vision
- The best language for learning systems programming
- A practical choice for game engines and graphics
- A bridge between C simplicity and modern safety
- A platform for safe DSL creation
Guiding Questions
Every feature proposal is evaluated against:
- Does this make common tasks easier?
- Does this introduce hidden complexity?
- Can beginners understand this within their first week?
- Does this maintain zero runtime overhead?
- Does this improve safety without hurting ergonomics?
Next: Learn about Security →