Comment by rramadass
3 days ago
I know your comment was meant as a tongue in cheek funny one but people should not be intimidated/overawed by the size of the C++ feature set. You don't need to know nor use all of them but can pick and choose based on your needs and how you model your problem. Also much of the complexity is perceived rather than real since it takes time for one to understand and assimilate new concepts. You can program very effectively and productively using just C++98 features (along with C if needed) with no hint of "Modern C++" (never mind the fanbois :-) What this gives you is the ability to use a single language to tackle small constrained microcontrollers with very limited toolchain support all the way to using the latest and the greatest toolchain on top-of-line processors.
Much of the complexity may be perceived, but much is also real, because of the commitment to backwards compatibility and non-breakage, plus poor default behavior of many things, often due to the C legacy, sometimes due to inopportune choices in earlier versions of the standard. Just think of things like variable initialization with () and/or {} ; or various kinds of implicit casts ; the hoops you need to go through to work with variants; etc.
But I agree that one doesn't have to learn everything, or nearly-everything, to write decent-to-good modern-C++ code.
The problem is that many confuse C++ Language expertise (often snarkily called a "language lawyer") with C++ Programming expertise. A famous example is Scott Meyers who is squarely in the first camp and who has publicly stated as not having written any sizeable C++ programs. Given that C++ is quite a baroque language it is important for programmers to focus on the second aspect and slowly build up their knowledge of the first aspect over time (most experienced programmers tend to do this in any language).
As a person who has some of both, I'm not so sure I agree. Many developers just get into the habit of assuming they don't need any more language knowledge, since they get by already, and the codebase they use is filled with code which fails to utilize most modern language features, and _that_ is already quite a hassle to know well enough to use.
1 reply →