3 ms·
The problem with C++ is that the language is too damn big. This results in most programmers only learning really well a subset of the language. Unfortunately,
by tzs 16y ago
The problem with C++ is that the language is too damn big. This results in most programmers only learning really well a subset of the language.
Unfortunately, different programmers end up with different subsets.
I'd like to see some de facto standardization on subsets. For instance, there could be Basic C++. When programming Basic C++ you use it like C with the following C++ features added: constructors, destructors, references, std::string, and maybe the STL collections.
Simple Object C++ could be Basic C++ plus single inheritance.
The on top of that, we could add things like multiple inheritance, operator overloading, templates, and so on.
- thedigitalengel 16y agoMost projects have a set of coding guidelines. I don't see why it cannot specify things like: "Don't use operator overloading!". Google does, for one thing. Without discipline both C and C++ will blow you up completely. With some discipline both the languages are manageable, and C++ more so; which is what the OP points out.
- peterbotond 16y agothat's exactly right and correct. any language can be screwed up without descipline, and understanding of the solution trying to be implemented. me for example, put comments in code that what direction of design, execution path is taken to correct less efficient idioms. so, at a later time, new code can be added with some direction. this prevents the urge to copy and paste by the new guy. coding guidelines are also to include programming idioms, primitives, to use and build the solution around it. for c++, c and others i wrote many of guidelines, and seeing the benefit later i can say the above.