Rust has a static “garbage collector”
> I don’t generally find writing Rust to be significantly harder than using a GC’d language. I’ve been trying to figure out why that is.That's quite surprising! Here's some examples of where things would be easier to write if Rust had a GC:1. Any sort of lock free algorithm. This is a big one - hazard pointers and the like are much harder than letting the GC clean up.2. Data structures which may contain "back" pointers (e.g. parent pointers in a tree).3. Data structures which may be cyclic. For example the classic LRU cache is best implemented with a cyclic linked list which is hard to express in Rust.4. Any sort of refactoring that may adjust ownership. E.g. going from T to Rc. GC requires fewer choices so these refactorings are easier.Surely this pain is real, even if Rustaceans think it's worth tolerating?In fairness precious resource cleanup (file descriptors, etc) is easier without a GC.