A comparison of Rust’s borrow checker to the one in C#

The author explores the concept of memory safety in C# in relation to Rust’s borrow checker. They discuss the evolution of memory safety features in C# and how they compare to Rust. One unique aspect highlighted is C#’s ability to have references that live forever due to garbage collection, which is not possible in Rust. The author also points out the differences in handling shared and exclusive references between the two languages. They speculate on why these changes in C# have not received much attention and suggest that the languages may be converging in their approaches. Additionally, the author mentions recent improvements in C# 11 related to multi-reference scenarios.

https://em-tg.github.io/csborrow/

To top