News for hackers. Stuff that matters.
Re:A Usable C++ Dialect That Is Safe Against Memory Corruption by Animats on Thursday March 15, 2018 @02:57PM (#16595579)
"Now, we can extend our allocation model with a few additional guidelines, and as long as we’re following these rules/ guidelines, our C++ programs WILL become perfectly safe against memory corruptions."

What could possibly go wrong?

Re:A Usable C++ Dialect That Is Safe Against Memory Corruption by saagarjha on Thursday March 15, 2018 @03:05PM (#16595637)
If you're not being facetious, then really, not much. You really can't go wrong with smart pointers unless you explicitly try to access the memory it handles rather than going through its normal interface (e.g., not using get()). Shared pointers are basically reference counted just like many other language handle memory management.
Re:A Usable C++ Dialect That Is Safe Against Memory Corruption by kolpa on Thursday March 15, 2018 @03:45PM (#16595977)
> > as long as we’re following these rules/ guidelines

If that's an assumption, it's not worth much. A safe language is one that enforces the rules, not one that hopes the program authors self-enforce.

Re:A Usable C++ Dialect That Is Safe Against Memory Corruption by nobugs on Friday March 16, 2018 @02:47AM (#16599040)
Of course. The point is that (IF there is enough interest in the idea) these rules are simple enough (in particular, they're inherently local, i.e. don't require analysis to go beyond one single function) to be enforced by a tool (say, built on top of Clang-tidy).
Re:A Usable C++ Dialect That Is Safe Against Memory Corruption by jcelerier on Friday March 16, 2018 @04:46AM (#16599388)
By that measure Rust would be unsafe since it hopes that the authors don't just put everything in unsafe blocks.
Re:A Usable C++ Dialect That Is Safe Against Memory Corruption by dcookie on Thursday March 15, 2018 @03:59PM (#16596071)
I don't think anyone claimed the _language_ was safe.
Re:A Usable C++ Dialect That Is Safe Against Memory Corruption by Animats on Thursday March 15, 2018 @05:51PM (#16596813)
Title: "A Usable C++ Dialect That Is Safe Against Memory Corruption".

Any questions?

Re:A Usable C++ Dialect That Is Safe Against Memory Corruption by alacombe on Thursday March 15, 2018 @06:30PM (#16597031)
The author claims that the rules described, "extending" the standard C++, are enforcing memory corruption, and it is this author described subset that is still unsafe, not C++ in general. Think about english vs. americanized english, largely the same, but two distinct entities.

In C++, you are free to shoot yourself in the foot. In Rust, you have a Government inspector ensure that you always point the gun not just in a "safe" direction, but only toward a crosshair target at a designated gun range.