by paulgdp · 5y ago · 0 comments
I think this feeling comes from the fact that it takes longer to learn the basics of Rust compared to C++.
However, once one has learned C++ or Rust to a reasonable level, I would argue that Rust is actually easier to use.
This is not the same thing but many people make this claim.
But it is a fair bet that changes to C++ code to implement a point performance optimization will be smaller than the same sort of change would be for Rust code. For the latter, you are likely to need to re-architect that part of the system some to get your optimization and still satisfy the borrow checker. Having a borrow checker that demands satisfaction is a virtue, but there is no denying it adds cost in the small, where we're talking about, notwithstanding that such cost may be paid back at the system level.
Does it really? For example I'd think that initialization of objects is a topic that should be in "basics", yet initialization of objects in C++ seems disproportionately complex compared to Rust (at least to me).