3 ms·
Sorry, don't see how this touches on my question at all. I don't use shared_ptr in C++, and don't know any reason to make Arc nicer in Rust. My question was spe
by ncmncm 5y ago
Sorry, don't see how this touches on my question at all. I don't use shared_ptr in C++, and don't know any reason to make Arc nicer in Rust. My question was specifically about a Rust analog of the common idiom
struct X {
std::unique_ptr<XImpl> p;
};
- pjmlp 5y agoYou don't need that at all in Rust, all pointers are unique by default. My initial remark was regarding the ergonomics of reference counting, naturally for values greater than 1. The reason is exactly that, ergonomics and developer productivity. A reason usually taken into account when picking programming languages for a project, if multiple options are available.