e013: Staying alive – reasoning about and using lifetimes in Rust (and why we need them)
This episode, I do my best to talk about lifetimes. I admit to being slightly in over my head in this episode. (You know, just like in all of them!) But I had a lot of fun thinking through this and recording it. From the show notes:
Lifetimes are our way of reasoning about how long a given piece of data is available and safe to use in Rust. The reason we don't have the dangling pointer problem is that we do have lifetimes instead. They're not magic, they're just a bit of semantics and syntax that let us specify the rules for how long any given item lives, and how long references to data must be valid.