A new way to think about borrow checking (in reverse)
verdagon
47 points
5 comments
October 18, 2026
Related Discussions
Found 5 related stories in 102.6ms across 9,867 title embeddings via pgvector HNSW
- Valen's Memory Safety: A New Kind of Borrow Checking verdagon · 153 pts · October 11, 2026 · 63% similar
- Ten ways a check passes while the thing it checks is broken degibug · 17 pts · July 22, 2026 · 46% similar
- Weak Links Start to Show in A.I. Borrowing ceejayoz · 18 pts · October 17, 2026 · 44% similar
- The Reverse Information Paradox (Satya Nadella) adletbalzhanov · 14 pts · July 20, 2026 · 43% similar
- The AI trade now runs on borrowed money, and the lenders are repricing it haipothetical · 109 pts · July 31, 2026 · 43% similar
Discussion Highlights (4 comments)
verdagon
Figuring out how to make this was a pretty wild ride. I had zero clue how to approach this, so I went into the mountains with pencil and paper until I figured something out. I started with a sort of "compile-time generational references" approach, where every reference would also remember when it was made, at compile-time. Then that evolved into a couple more things until I finally figured out this reverse approach. We'll see if it sticks. Hope you all enjoy!
CoalitionOfPity
I just wanted to take the time to compliment this note in your blog: > My stance: if you want someone to take the time to read something, take the time to write it by hand.
gnarlouse
I have no help to offer, but as a bystander who loves Rust I am very hopeful good things come of this for you @verdagon!
Animats
Interesting. In Hoare-type proof of correctness work, it's normal to work backwards from the proof goal (such as an assert statement) back upwards through the program, adding info about code that affects the variables in the assertion. This approach to borrow checking follows that model. You want some state at some point, and you work backwards to see if the preceding code gets you there. Makes a lot of sense for lifetimes. The main problem with doing this inside a compiler is performance. You backtrack for each thing you need to prove, going through the same code more than once. I used to think that compilers should use more verification technology, but people start screaming about compile times.