I think a valid concern might be - in 5 or 10 years, C++ still remains, just like Java and other "boring" languages. However, Rust might have been replaced by the next "Rust". That environment is still somewhat in flux.
Re:Ask HN: Learn C++11 or Rust in 2022?
by pietromenna on Monday May 02, 2022 @07:42AM
(#31233833)
I agree with you, it might turn out that C++ outlives Rust. I am seeing more codebases being created from scratch in Rust nowadays. We are just making bets on the opposite side.
I guess we both agree that the deciding factor should be what you think the future will look like in 5+ years. Nobody knows what will happen in 5 years, then it is a bet or an investment decision you make.
In the future, those codebases will only be the legacy ones and you will end up doing more maintenance with C++.
With Rust your investment of today will pay off in a few years.
Deciding what to learn today is an investment decision and you should look into what you think the future will look like. To me it looks Rusty. :-)