News for hackers. Stuff that matters.
Re:My Most Important C++ Aha Moments (2006) by pcwalton on Sunday June 26, 2016 @02:37PM (#11982010)
> In any large scale C++ conference like CppCon.

> In tooling from Microsoft and Apple.

Microsoft and Apple regularly ship memory safety vulnerabilities in their codebases that are written in modern C++. Their browser engines, for example.

> Using C++11 idioms, or C with classes?

Using C++11 idioms. C++11 doesn't actually do anything to mitigate use after free, for example. In fact, I think there's a reasonable argument to be made that C++11 is less safe than C++03 in terms of use after free, because of features like move semantics and lambdas.

And I'm not intending to argue "use Rust" here. There are plenty of other memory safe languages out there. I'm simply arguing that C++ is not memory safe, and it cannot be while preserving any semblance of backwards compatibility. The specific technical reasons for this have been elaborated in posts that I've sure you've seen. I'd like to see proponents of the idea that modern C++ is memory safe actually try to rebut those.

Re:My Most Important C++ Aha Moments (2006) by pjmlp on Sunday June 26, 2016 @04:24PM (#11982507)
The issue is not that C++ is 100% memory safe language, it is not.

Personally I would rather be using Ada or Modula-3 for the few use cases I still use C++.

However in the context of security minded developers that can only choose between C, Objective-C, C++ and nothing else, C++ is the only one providing the features to write safer code.

Of course if not all team members play ball it doesn't work, but it is better than not having an option at all.