▲ | hansvm 3 days ago | |||||||
That's fair. It's not really a good pattern though. You get all the runtime overhead of object-soup allocation patterns, syntactic noise making it harder to read than even a primitive GC language (including one using ARC by default and implementing deterministic dropping, a pattern most languages grow out of), and the ability to easily leak [0] memory because it's not a fully garbage-collected solution. As a rough approximation, if you're very heavy-handed with ARC then you probably shouldn't be using rust for that project. [0] The term "leak" can be a bit hard to pin down, but here I mean something like space which is allocated and which an ordinary developer would prefer to not have allocated. | ||||||||
▲ | Aurornis 3 days ago | parent [-] | |||||||
I agree that using an Arc where it's unnecessary is not good form. However, I disagree with generalizations that you can judge the quality of code based on whether or not it uses a lot of Arc. You need to understand the architecture and what's being accomplished. | ||||||||
|