[Idea] Improving the ergonomics when using Rc

In Swift I don’t know when refcounts are optimized out and when they aren’t. This feels similar to the problem I have with Rust: I don’t know when bounds checks are optimized out and when they aren’t.

If Rust had a practical solution for this “is it optimized out or not” problem, then automatic refcounts and other automatic things could be OK. Otherwise I prefer erring on the side of visibility and control.

What about automutex and autorefcell? These are often used together with the refcount types, so autorefcount solves only half of the boilerplate.

1 Like