Despite C++ having many footguns, including all of those of C, and then some, I ...

@brouhaha@mastodon.social

Despite C++ having many footguns, including all of those of C, and then some, I definitely find that in programs of comparable size and complexity, I have far fewer memory/pointer problems in C++ than in C.
I attribute that to my C++ coding style doing absolutely no explicit pointer arithmetic, as little use of bare pointers and bare arrays as possible, and using .at() methods on vectors and arrays instead of operator[ ].
IMHO, std::shared_ptr was the best innovation in C++11.
#CPlusPlus