A traffic light that is red and green at the same time. A user who is logged in and logged out simultaneously. Boolean flags make these absurd states perfectly representable, and that is the problem.
The Rust community turned .clone() into a moral failing. That dogma is as dangerous as the Jedi Council’s inability to adapt. We put the guilt under a microscope: the real performance numbers, the clippy lint that reinforces it, and the type theory that explains why Rust makes duplication visible in the first place.
Move, borrow, clone, Rc, Arc, Cow. Rust gives you six lightsaber forms for ownership. Each one counters a specific threat. Using the wrong form against the wrong opponent is not just inelegant, it is fatal. We map each strategy to the situations where it excels and where it fails catastrophically.
The Rust community treats .clone() like a code smell. Sometimes it is. But most of the time, the instinct to avoid it costs more in complexity than the clone costs in nanoseconds. We dissect what clone actually does for every common type, the real cost spectrum across six orders of magnitude, and why Clone and Copy are not the same conversation.
Every trait in your hexagonal architecture is a tagless-final algebra. Every impl is an interpreter. You have been writing denotational semantics without knowing it. We trace the connection from Kiselyov’s paper through Scala’s Cats-Effect to Rust’s port traits, and show why the pattern that academics call ‘finally tagless’ is the same pattern that practitioners call ‘dependency injection.’
The rat serves the last course. We fix input lag with non-blocking event polling, add the edit feature as a full vertical slice from application layer to TUI, watch the state machine grow from 3 to 4 variants with compiler-guided safety, and close with the key takeaways from the entire migration.
The rat learns to plate. Five UX improvements transform a monochrome prototype into a scannable, responsive tool: color coding, positive feedback, empty state guidance, transient messages, and a visual cursor. Then we replace the cramped command bar input with a centered modal popup.
The rat wires up the ears. We implement mode-specific event handlers with crossterm, redesign the key mapping to use a toggle instead of separate keys, solve the terminal restore problem with a capture-cleanup-return pattern, and run cargo test to discover that zero lines changed outside the adapter.