Beyond the Borrow Checker
Most Rust tutorials frame ownership as a hurdle. I see it as a lens -- a way of seeing data flow that makes you a better programmer in every language.
The Three Rules
- Each value has exactly one owner
- When the owner goes out of scope, the value is dropped
- You can have either one mutable reference OR any number of immutable references
These three rules encode decades of hard-won wisdom about memory safety into the compiler itself.
How It Changed My TypeScript
After internalizing ownership, I started writing TypeScript differently. I began thinking about who "owns" a piece of state, where mutations happen, and what the lifetime of data should be. The result was cleaner, more predictable code across the board.