3 ms·
Excellent description. I really like the section of "Thinking in Scopes" in the Book that describes this: https://doc.rust-lang.org/book/first-edition/lifetim
by bluejekyll 9y ago
Excellent description.
I really like the section of "Thinking in Scopes" in the Book that describes this:
https://doc.rust-lang.org/book/first-edition/lifetimes.html#thinking-in-scopes https://doc.rust-lang.org/book/first-edition/lifetimes.html#...
You can think of lifetimes as hidden variables defined by the compiler that are in a sense bound to some block of code. I find this to be the best way to think of them personally.