Re:Rust 1.42
by saagarjha on Thursday March 12, 2020 @01:33PM
(#22559383)
I would steer you away from Rc and Arc unless you know you need them.
[ Parent
| on HN ]
Perhaps. I can think of a couple reasons to steer people away from Rc/Arc: they are less efficient than references and they don't support cyclic garbage collection. On the other hand, Rc/Arc are very helpful for newcomers coming from garbage collected languages and they can be more efficient than cloning. If I asked an employee to convert some high level module to Rust and that employee used a lot of Arcs where they weren't really necessary, I would say that employee had done a reasonably good job.