4 ms·
Arc’s are extremely common in Rust and C++ codebases.
by binary132 1y ago
Arc’s are extremely common in Rust and C++ codebases.
- pjmlp 1y agoNot really, because they are not Automated Reference Counting, rather manual with explicit clone operations, in some scenarios. Also contrary to systems where reference counting is part of the type system, and not library types, they aren't able to optimize counts away. When this happens is as side effect of the compiler optimizing away inlined code, but not by pairing inc() with dec() operations that never leave scope.
- afdbcreid 1y agoCommon, yes, although extremely common, that depends on the codebase and its goal. But they are not the default, and that what makes them system languages.