Hacker News new | past | comments | ask | show | jobs | submit
This is bad news for C/C++
The good news is that this was already the case, and we have tools that check for this; like fuzzers and sanitizers.

Now to get people to use them it's an issue.

We have had fuzzers and sanitizers for decades. Despite their widespread use, we still experience a deluge of memory safety issues in memory unsafe languages, including in projects that heavily lean on these tools.

The actual good news is that we have multiple mature languages that entirely remove the need for users to configure and run fuzzers and sanitizers and remember to always obey arcane rules in order to avoid memory corruption.

We’ve been encouraging people to walk, not run, to the exits and switch from C and C++ to memory-safe equivalents. Now it is clear that the time for walking is over and the remaining holdouts should be at the very least jogging if not running.

Yes, but to quote an earlier comment:

> Let's say you rewrite your terminal emulator in Rust from C or C++; you'll first undo decades of bug fixes, compatibility decisions, quirks, etc. which you WILL have to deal with eventually. This essentially puts you back at least a decade, because these issues take users using the software to point out to you before they're fixed. The only benefit of this whole game being that you get memory safety. These teams are never the original teams, which is the source of the problem. A rewrite can only succeed if it's a result of all the learned failures and shortcomings of the original, otherwise it's bound to repeat every single mistake and add more on top.

> And you don't even deliver memory safety to the users of the original this way, because people won't use the rewrite, because it's buggy, incompatible, etc.

The problem are the technologies written in them, that we aren't replacing any time sooner.

I work mostly in compiled managed languages, yet have to keep my C and C++ skills sharp, as there is always this or other scenario that requires something written in them, like the runtimes or compiler tools I depend on, because bootstraping is too much work for most implementors.

Ah yes, the "programmers just need to be better" argument.

I would prefer something be impossible by construction.

There are memory-safe options with little/no performance overhead compared to C/C++.

loading story #50572446
This is bad news for computer industry. See the recent Java4Shell.
because the assembly for the base64 decoding was handwritten, the paren't comment is still valid
I think the point is that the weakest link WILL be found.
Good news for the computer industry employees though.
At least C folks can use something like BoehmGC and calm down things a little.
BoehmGC is 40 years old by now, it hasn't been for lack of opportunity.