Hacker News new | ask | show | jobs
by simfoo 1043 days ago
What if "C/C++" is not actually a thing and modern software engineering practices is what actually makes software safe? Writing modern C++ with good test coverage, sanitizers deployed and wrapping critical/unsafe parts into safe interfaces gets you _very_ far.
3 comments

"Just don't write bugs", eh? :P

I don't necessarily disagree with you about C/C++ (or even Brainfuck) but some languages have the tendency to push you in the right direction and I've come to appreciate those more with time.

Unfortunately far too many people writing C++ are not writing modern C++. Most writing C with classes.

You can write memory unsafe code in rust, including memory management if you want - you just have to wrap it in unsafe which at least clues others in to watch this area carefully. In C++ you can put unsafe code anywhere. Sometimes unsafe is really needed, rust makes it hard enough to write unsafe code that you will only do that where you must and then jump back to safe code. In C++ you are likely to mix safe and unsafe code all over and that makes audits harder.

Wishing for something won't make it come true. C++ has had decades to get this to where it needs to be, there's no reason to hope that if we just give them another chance they'll get it right this time when you can instead use a language which got it right.