3 ms·
No way, C++ removed some C problems but just added a whole host of its own problems, that don't exist in C: operator overload hell, static initialization and de
by jernfrost 11y ago
No way, C++ removed some C problems but just added a whole host of its own problems, that don't exist in C: operator overload hell, static initialization and deinitialization hell. Calling virtual methods in constructors blow up. I programmed C++ for 13 years and must have had rose tinted glasses on. I kept reading books like Effective C++ thinking that my bugs would go away as soon as I learned all the intricacies of C++ and best practices. I realize now that I mostly program in other languages that the enormous amount of knowledge you need when writing C++ safely simply isn't needed in most other mainstream languages.
If you think C++ is the answer to C's problems I think you suffer Stockholm syndrome. You've gotten so used to all the issues in C++ and started thinking about them as normal, so you stop seeing what a mess this language is.
- thrownaway2424 11y agoNobody is going to make you overload operators, do work in constructors, or throw exceptions. Restrict yourself to the subset of C++ that you prefer. By comparison there is no subset of C that lacks malloc/free.
- sixbrx 11y agoIn practice most of us are restricted to the subsets (note plural) chosen by the people who wrote the original systems we work on.
- ant6n 11y agoBut then you can't move to another language anyway. If you can move to another language (say if you start a new project), it's worth moving from C++ to C++11.