#pragma safety(on)
I was a bit surprised to learn how much effort language designers are putting into building safe subsets,
to prevent users from committing such unspeakable atrocities like
buffer overruns, and dereferencing invalid pointers. One would expect
that in AD 2008 buffer overruns are old RedHat.
Similarly
surprising, a vast majority of C++ developers (and ex C++ developers
that defected to C#) consider C++ to be an unsafe language.
Not
being a very productive bug writer myself (on a good week I may turn
about five) I may not be qualified to speak. It has been a long time
since I overran a memory buffer. Mostly, my bugs are in the
multi-threaded area these days (when they are not logical errors, but
let's not talk about that).
Since switching from the old C
habits to the C++ style of using STL containers and smart pointers (yey
boost::shared_ptr) my buffer overruns have decreased to zero Kelvin.
Speaking of shared_ptr, (in either its boost or TR1 incarnation) I saw a very good presentation at the Northwest C++ Users Group on Wednesday: Stephan T Lavavej did an impressive tour of shared_ptr, useful both to beginners as to the more seasoned developers.
And
I expect to see my bug rate decrease in the multi-threaded area as soon
as I make the transition from hand-crafted thread synchronization to
using Thread Building Blocks.

