by pvitz · 3y ago · 0 comments
It would be more interesting to compare only the code of C++ and Rust written in the same timeframe. My expectation is that C++ wouldn't look as bad as stated in the article.
If you never call .get() on a unique_ptr then you'll be okay. But that's often not a workable design.
No, it isn't. That's flagged by default settings of most static code analysis tools, and it requires explicitly going against the whole point of explicitly assigning ownership of an object.
I agree. The article reads like it started with w conclusion and cherry-picked data to fit that.