|
|
|
|
|
by Jweb_Guru
4293 days ago
|
|
I definitely understand where you are coming from, and I agree that C++11's ecosystem maturity is a great reason to choose it at the moment. However, I cannot agree with you that Rust's safety guarantees are not useful for most C++ programs, or that you have to be an "idiot" to do memory-unsafe things in C++11. Someone at Yandex recently did a presentation about Rust [1] in which they pointed to a bit of (completely idiomatic!) C++11 code that caused undefined behavior. The audience, full of seasoned C++ and Java developers, was asked to identify the problem. Not one of them could point to what was causing it (the compiler certainly didn't). The next slide demonstrated how Rust's compiler statically prevented this issue. The issue could have taken weeks to surface and days to track down, and the C++ compiler simply didn't have enough information to determine that it was a problem. This is something that happens over and over to anyone using C++, in any application, not just security-critical ones. I'm not saying C++11 doesn't improve the situation, because it does--it would be disingenuous to say otherwise. But it's equally disingenuous to imply that C++11 makes memory management straightforward or safe. It does not. [1] http://habrahabr.ru/company/yandex/blog/235789/ (note: the presentation and site are in Russian). |
|
It would be great to have at least that segment of the talk translated. Sounds like a good example.