The following article describes how to grasp the complexity of C ++ from a higher level. One of the most important guiding ideology is to pay attention to whether the technology or details you are learning are in the 80% scenario or 20% scenario.
Therefore, when you find that there are new possibilities in this common environment, of course, you will be excited. For example, when I was reading Modern C ++ Design, I had to read it from the morning till the evening and did not eat it for lunch.) But actually?
The first-class support may have long been available in other languages. Other languages may not need this practice because they do not have these defects. In addition, from a practical point of view, more importantly, these "solutions" may not be available for programming at ordinary times.
No, I'm not saying that these patch schemes are not important. As mentioned above, complicated skills in C ++ are not just a plug-in, and there are always practical problems behind the scenes. But the problem is that, for our daily programming, these "practical problems" are simply out of reach. I can't afford to spend 80% of my resources first. I just need to stick the things I used in 20% to my mind. I just need to check documents or books when I use them.
Here, we can see another reason for shaping the special mentality philosophy in C ++. In fact, this is the true root cause. One reason I mentioned above is that C ++ book market education. Why do people like to write these books? Further, why do people like to read these books?
I admit, I have read it with relish .) The answer is simple: psychology. Fact 8 ). Recognizing this is not to advocate it, but to get rid of their attraction only when we realize why we are interested in researching a bunch of patch solutions.
All in all, the complexity of C ++ is only a necessary condition, not the root cause of the problem. The root cause is that people's psychology. Everyone likes to dance with their feet and thinks it is "Innovation ". Realizing this can help us avoid taking unnecessary time by a wide variety of language details and techniques.
However, the complexity of C ++ is always an unavoidable reality. C ++ has a large number of traps and defects, and the latter leads to an astonishing number of usage and workarounds. It is a very bad practice to learn in advance without any choice. It is not only inefficient, but also unnecessary. It is a waste of life.
Einstein once said, "I just want to know the design concept of the 'others' universe. Everything else is details ". However, as some other readers have pointed out, if you do not have any idea about these details in C ++, I am afraid it will become useless in actual coding, you may not know where to go to RTFM. This is why so many C ++ interviews will bother asking some representative language details.
It is not good to put all the details in your mind, but it is also not a way to know nothing about the details. So what attitude and learning methods should C ++ Programmers take to deal with the complexity of C ++? In fact, the answer is also very simple.
First, some important and necessary language details and features need to be mastered. Then, we only need to know where there are complexity traps and defects in C ++ ), when you encounter a problem, you will naturally be able to know where to find the answer. The specific suggestions are provided later.
- In-depth analysis of C ++ Programming
- Describes how to get started with Visual C ++
- Describes how to learn the C ++ Language
- Introduction to the C ++ Language Structure
- Several minutes to help you solve the C ++ complexity Problem
Originally, this section was intended to create a C ++ complex index. However, as a result, C ++ is too complex, 2. There are already a lot of materials on the Internet, such as Bjarne Stroustrup's C ++ Technical FAQ, which is a good document). In addition, most C ++ books on the market keep talking about language details; therefore, we do not actually lack information, but a method to index the data and a modular way of thinking to control the complexity.
For the above reasons, the complexity of C ++ is not detailed here, but a classification standard is provided. There are two classification methods for the complexity of C ++: non-essential complexity and essential complexity. Non-essential complexity is divided into defects and traps. Another classification method is categorized by scenario: complexity in library development scenarios and complexity in daily coding. From the perspective of practitioners engaged in daily coding, the adoption of the latter classification allows us to quickly grasp the complexity of 80% scenarios.