Valen's Memory Safety: A New Kind of Borrow Checking
Valen's group-borrowing checker aims to stop use-after-free with fewer restrictions than Rust-style borrow checking.
A Valen blog post describes a relaxed borrow checker based on Nick Smith's group-borrowing design. The compiler tracks where references point and rejects use-after-free at compile time while allowing patterns Rust typically rejects, including multiple mutable aliases. The design is meant to interoperate with Rust and to combine with Vale-style reference counting and generational references. Related languages including Google's Carbon, Ante, and Fang have explored similar ideas.
- Group borrowing relaxes shared-xor-mutable to a no-use-after-free rule.
- The compiler records where each reference points to reject unsafe uses.
- Valen aims to interoperate with Rust and with reference counting.
- Carbon, Ante, and Fang have explored related borrow-checking ideas.
- Organizations
From the original article
16 min read at verdagon.devThis post is about Valen 's new flexible borrow checker. Welcome! You all know me, I love exploring new memory safety approaches and blending them together in weird ways.
By verdagon · verdagon.dev
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.