▲ | hawk_ 4 days ago | |
How do you use Rust without lifetimes? | ||
▲ | legobmw99 4 days ago | parent | next [-] | |
Either a lot of clones or a lot of reference counted pointers. Especially if your point of comparison is a GC language, this is much less of a crime than some people think | ||
▲ | shpongled 4 days ago | parent | prev [-] | |
When I mean "use" them, I mean make heavy use of them, e.g. structs or functions annotated with multiple lifetimes, data flows designed to borrow data, e.g. You can often get by just with `clone` and lifetime elision, and if you don't need to eke out that last bit of performance, it's fine. |