News for hackers. Stuff that matters.
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++.

    std::vector<int> v {1, 2, 3};
    int& x = something(v);
    something_else(std::move(v));
    x = 42;
Is this UB? Impossible to tell without examining the code of the functions involved!
Re:Ask HN: Learn C++11 or Rust in 2022? by jdrek1 on Thursday May 05, 2022 @05:29PM (#31278623)
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.