4 ms·
I'm not a proficient Rust programmer yet, but the thing I've been finding is that previous programming experience often suggest solutions that require lifetimes
by mikekchar 7y ago
I'm not a proficient Rust programmer yet, but the thing I've been finding is that previous programming experience often suggest solutions that require lifetimes. These solutions are often inappropriate. I think as one becomes more fluent in Rust oriented solutions, it will become more obvious that there is a better way to approach the problem. It's not so much that the use of a lifetime is indicative of poor code. It's more that due to lack of experience in the Rust way of doing it, you are more likely to reach for lifetime solutions that are inappropriate. Trying to avoid them at all cost as a novice seems like a good way of finding out where you absolutely need them (and, in my experience, there are definitely many such places). It sounds like a good exercise.