Valen's borrow checker walks functions backwards to catch use-after-free

A new way to think about borrow checking (in reverse)

Valen, an experimental language that makes shared-xor-mutable optional and allows memory-safe calls into Rust, checks memory safety in reverse. After parsing, typing, and static grouping, its fourth phase scans each function from the last statement upward, tracking which references will be used later and flagging any mutation that invalidates them. The author argues the backwards walk helps with last-use analysis, loops, and speed, and asks readers to poke holes in the approach.

This is weird because, as far as I know, it's the only borrow checker whose safety check goes backwards.

More from this day

2026-10-19