News for hackers. Stuff that matters.
Re:Common Rust Lifetime Misconceptions by packetlost on Monday December 04, 2023 @09:03PM (#38526089)
This is how my team writes production Rust code. Knowing which one to use and when is important, but there's nothing wrong with using the tools available to you.

Non-lexical lifetimes are, in my experience, pretty uncommon in most non-library code. You don't really need them until you really need them.

Re:Common Rust Lifetime Misconceptions by inejge on Tuesday December 05, 2023 @12:14AM (#38527366)
Non-lexical lifetimes are, in my experience, pretty uncommon in most non-library code.

To avoid confusing the newcomers: lifetimes are always non-lexical (see [1] for the pedantic details.) I suppose you meant that explicit lifetime annotations are pretty uncommon, which is not wrong.

[1] https://blog.rust-lang.org/2022/08/05/nll-by-default.html

Re:Common Rust Lifetime Misconceptions by packetlost on Tuesday December 05, 2023 @12:58PM (#38534510)
Oh yeah, wrong terminology. My bad!