Bodil is a compulsive conference speaker in the fields of functional programming, web technologies and Soviet space dogs, and helps organise multiple developer conferences in the UK and Scandinavia. She’s been everywhere from JavaScript to Haskell and has recently been spending quality time with Rust. Most of the time she’s not even upset that it doesn’t have higher kinded types yet.
There’s a discrepancy between the careful attention to mutability and immutability in Rust itself and the data structures available in the standard library. The only way to update a Vec with an immutable ref is to clone it first, which could get expensive. But what else can you do?
Turns out there’s a number of data structures out there that make it cheap and easy to do immutable copies and updates. Some are so simple it’s ridiculous, some are anything but, and we’re going to dive into some of the more useful ones, how they work, why you should care, and how to best implement them in Rust.