Re:Ask HN: Learn C++11 or Rust in 2022?
by umanwizard on Wednesday May 04, 2022 @11:58PM
(#31269273)
It's entirely possible to invoke memory unsafety in modern C++.
Is this UB? Impossible to tell without examining the code of the functions involved!
[ Parent
| on HN ]
Nobody said it's impossible, it's just generally not an issue if you write normal code (read: stop treating C++ as C, they are completely different languages). There's only very little difference in how much you need to think about lifetimes and stuff between Rust and modern C++, it's far from being "hard". Sure Rust holds your hands a bit more in those regards but you can also just turn on address sanitizer and friends and then you have a very similar experience.