News for hackers. Stuff that matters.
Re:Rust Lifetimes by dbaupp on Saturday October 31, 2015 @08:01PM (#10484784)
> Here, what we're saying is, "For any lifetime 'a, foo can take a slice that lives as long as 'a and return a pointer that lives as long as 'a".

Another way to phrase it is: the return value of the function is guaranteed to be valid for at least as long as the argument (but may borrow from it, and hence mutations of the argument need to be outlawed as long as the return value is held).

Re:Rust Lifetimes by Manishearth on Saturday October 31, 2015 @08:06PM (#10484807)
Agreed, it's nicer to talk about "validity" than "liveness" :)
Re:Rust Lifetimes by dbaupp on Saturday October 31, 2015 @08:29PM (#10484880)
Well, my rephrasing was meant to be more than just s/validity/liveness/: I find that removing quantifiers (like for-all) often improves my understanding, as it usually gives more obvious context/motivation for what the goal is. It is then easier to understand the more formal version once I know approximately what it is trying to do.