5 ms·
> > 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 th
by kolpa 9y ago
> > 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.
- dcookie 9y agoI don't think anyone claimed the _language_ was safe.
- Animats 9y agoTitle: "A Usable C++ Dialect That Is Safe Against Memory Corruption". Any questions?
- alacombe 9y agoThe 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.
- nobugs 9y agoOf 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).
- jcelerier 9y agoBy that measure Rust would be unsafe since it hopes that the authors don't just put everything in unsafe blocks.