Comments by "Mikko Rantalainen" (@MikkoRantalainen) on "Bjarne Says C++ Is Under Attack" video.

  1. C++ is now 40 years old and people are still creating lots of memory safety issues with it so it's clearly the problem. If C++ was great and this would be only about skill issue, we would have figured out a correct way to teach C++ to new programmers by now. I was lucky enough to have a great teacher in the university while learning C++ and I already knew Pascal, symbolic assembly and C before even trying to learn C++ which probably helped, too. C++ has always been about maximum runtime performance, not about memory safety or thread-safe code. Rust is the other way around: it's safe first and then maximum possible runtime performance as second. And the safety in Rust does include memory safety, but thread safety is even more important in my books. In fact, Rust is the only commonly used language that enforces thread safe code and still allows high performance multi-threaded code with shared memory structures. Even Java requires the programmer to manually mark synchronized methods and if one mark is missing, the compiler doesn't complain about it but the program just misbehaves (typically apparently randomly because it's a race condition which is often the hardest issues to solve). Sure, it's possible to write correct code in C++ but most people are not able to do it because the language doesn't provide enough support and programmer simply must write perfect code every time. That said, I personally like to apply RAII style to any language with predictable destructors but I'm fully aware that most people do not follow similar style accurately enough.
    1
  2. 1
  3. 1