Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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#...

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: