Hacker News new | ask | show | jobs
by TillE 4474 days ago
C is irreducibly dangerous, but you can do quite a lot with C++ by avoiding legacy C stuff. Build almost everything on top of the STL and Boost, which are safe.

And of course there are security bugs (eg, goto fail) that would affect any language.

2 comments

Fully agree, mankind would be better without C and C++.

But given they are the current mainstream options for the time of applications they are used to, better use modern C++ like you are advocating and stay as far as possible from any pure C constructs.

Additionally use static analyser, enable all warnings as errors and turn on pedantic mode.

> Build almost everything on top of the STL and Boost, which are safe.

this is not really true, you can have temporal memory safety issues using STL and boost.