Polonius: Either Borrower or Lender Be, but Responsibly
summary
Polonius implements a concrete alternative to NLL by modeling where references originate rather than where they might be used, so it actually accepts the extra programs the NLL RFC promised and some more, and it claims a path to better performance though that is not fully proven. The prototype encodes rules in Datalog and the spec is compact — reframes borrow checker, tracks origins not lifetimes, 22 lines of Datalog vs 6,000 lines of legacy code — and a working group has a running prototype.
AI-written summary · about
chapters (7)
- 0:00Introduction to Polonius
- 2:27How the Borrow Checker Works
- 10:53Lifetime Inference Analysis
- 17:14Polonius Origin Analysis
- 24:44Solving Complex Borrowing
- 31:28Future Possibilities
- 33:43Status and Conclusion
related talks
32mThe First Six Years in the Development of Polonius, an Improved Borrow Checker
26mThe first six years in the development of Polonius
40mAgainst Borrowing: Own the forest, not the trees!
31mAn Incremental Approach to the Semantics of Borrowing
31mTowards a linear functional translation for borrowing
19mPure Borrow: Linear Haskell Meets Rust-Style Borrowing
53mThe Rust Borrow Checker - A Deep Dive
46mExploring lending async iterators
