the core of rust
a day ago
- Rust has a strong vision, similar to Uiua and Zig, with a smaller, cleaner language struggling inside.
- Learning Rust involves mastering many interwoven concepts simultaneously: first-class functions, enums, pattern matching, generics, traits, references, borrow checker, Send/Sync, and Iterators.
- A simple 20-line Rust file watcher program requires understanding closures, Result, generics, enums, pattern matching, iterators, Send/Sync, lifetimes, and move semantics.
- In contrast, an equivalent JavaScript program requires only first-class functions and nullability, highlighting Rust's complexity.
- Rust's interwoven design is intentional; features like enums with pattern matching, Result/Iterators with generics, and Send/Sync with borrow checker complement each other.
- The author refers to without.boats' concept of a 'smaller Rust'—a cohesive core of orthogonal features that compose well.