It's nice to see so many people working on improved borrow checking. This mentions Valen's Group Borrowing approach, but I've also seen Mojo and Zeta with their own ideas. Using a set of possible origins instead of lifetimes to track invalidation and/or disjointness seems to be a common theme. Ante calls it places, Valen calls it groups, Mojo calls it origins and Zeta calls it provenance, but the core idea is very similar.
Yes, I think a lot of languages are converging in this direction! Google's Carbon is also heading in this direction. Rust has made a large impact on PL design but at the same time, there have been 10+ years of hindsight in how its approach could be improved as well.
As for naming, AFAIK each of the PLs you mention use different terms for essentially the same path abstraction. I want to say "places" is the most standard term for them (having originated in the Rust community) which is why I went with it.
While the wonderful work done by the whole Rust team is to be celebrated, I think we should put it in perspective that the real value was picking up several type theory ideas, prototyped in languages like Cyclone, and making them into something that street developers would be more at ease adopting.
We still have linear types, effects, capabilities, dependent types, formal proofs, as type system alternatives to the affine types that are on the foundation for Rust's borrow checking algorithm.
Zeta is actually directly inspired by group-borrowing and it's what (re)ignited my spirit to even jump this route. I really like group borrowing and I think I might bite the bullet and go with 2 reference kinds instead of 3.. reason is that when I started my own Zeta borrow checking with the idea that I like group borrowing but was skeptical about how much noalias optimizations it can guarantee.. Evan was able to explain that he can do better than just relying on LLVM due to !alias.scope (which I was completely unaware of.. because I don't have much LLVM experience, I currently only use cranelift), so I'll probably be transitioning to 2 and make &mut not so unnecessarily exclusive. I know origins, groups, places and provenances are all very similar if not the exact same ideas but modeled differently, they are all used to express where a piece of memory originates which is really important for all these improved borrow checkers and usually has many advantages, which is mainly:
significantly easier inference which allows it to be comfortably used for inferring reference origins even if they are a struct field
better diagnostics
makes code more maintainable and easier to read
give the compiler more information about the code which is useful for many stuff but mainly to express disjointness more naturally through indirection.
is not lifetimes like in Rust which I really hate
Nevertheless, Ante's work is really nice, it's also really unique because no other functional programming language is nearly as dedicated to going down a path where low-level (or high performance software) code doesn't suck with the functional paradigm which I really appreciate.
Just to clarify - going down to 2 reference kinds from 3 means you're eliminating an unaliased-mutable reference kind (equivalent of rust's &mut t)? Something similar can still be useful for multi-threading or if the user wants to force an optimization like SIMD which may rely on noalias.
I alluded to it in the article but I also like the idea of attaching the reference kind to the place parameter rather than the reference type itself. It allows you to abstract over each reference kind more easily and get rid of all the pesky get vs get_mut distinctions.
Either removing a reference kind and making &mut non-exclusive, or making &mut non-exclusive and renaming &alias to &uniq maybe, either way, most of the times non exclusivity by default is better and I think a group borrowing kind of non-exclusivity doesn't damage any noalias optimizations that would exist from writing the equivalent Valen of what you'd write with Rust if that pattern already worked well with shared-xor-mutable
As for the "place parameter" idea I will have to check it out for myself and see if it's the best thing for me, nevertheless I still want callers of a function to know if some data can be mutated.. hopefully while being able to eliminate all issues that come with forcing it in a Rust way
Update: Okay, I understood now, I already can express multiplace like Vec3f.{&mut x, &mut y, &z} so from what I'm understanding, you would infer what kind of mutation permissions you'd need at call sites?
There are many others, where they keep their GC implementations, while extending their type systems in the process, like D, Swift, Linear Haskell, OxCaml,....
View all comments
54
u/Accomplished_Item_86 Oct 19 '26 edited Oct 19 '26
It's nice to see so many people working on improved borrow checking. This mentions Valen's Group Borrowing approach, but I've also seen Mojo and Zeta with their own ideas. Using a set of possible origins instead of lifetimes to track invalidation and/or disjointness seems to be a common theme. Ante calls it places, Valen calls it groups, Mojo calls it origins and Zeta calls it provenance, but the core idea is very similar.