Comment by survirtual
2 years ago
RefCell is a shared pointer. Arc is a shared pointer with atomic reference counting (so it can be used between threads safely).
Both these constructs use the "clone" trait to iterate the reference count.
I make primarily concurrent and async applications these days so I use Arc a lot for accessing memory that is very large and shared many places, such as context.
I think the real problem is Rust has a lot of rules (that make sense for safety) that take time to understand and most people aren't patient enough to make good software because of corporate conditioning.
No comments yet
Contribute on Hacker News ↗