For users and scholars who first came into contact with the C ++ language, it is very important to understand the concept of the C ++ language. let's first talk about what the C ++ language is, the so-called C ++ language is a widely used computer programming language...
In fact, whether on major domestic forums or on comp. lang. c ++. on International C ++ forums such as moderated and even in douban groups, those who are interested will find that the attention to the details of C ++ has never been stopped. Similarly, I have never complained about the details of C ++.
One example is comp. lang. c ++. james Kanze, a technical expert on moderated, said that he has been in contact with C ++ for ten years and now he still needs to go through the C ++ standard from time to time. It's no wonder that Eric Raymond's boss said in The Art of Unix Programming that "C ++ is compact. There are too many details in C ++. Even if I have read them all, I cannot remember them all. Even if you remember it, you cannot become a really good programmer.
Most people refer to too many details or "too many dark corners" as the essence of C ++, and think that all evil is born from this. That's why Linus said on the mail list about February September that "C ++ is a language with ideological burdens, just to keep programmers away from C ++, I also want to use C ".
This short sentence has aroused a great reaction in China. When Liu jiang switched to Linus, Yun Feng and Meng Yan both expressed their views; I also wrote an article "Why C ++" and sent it to Bjarne. Bjarne made a friendly comment on this article ).
However, I believe that the changes may not be very great. Most of the original opponents can find out the reasons for their opposition, so they are more opposed. Most of the original advocates can also find the reasons for their consent, so they agree more. The remaining ones do not have clear opinions, there may be no clue as to why each party has its own logic.
Obviously, if you cannot find a reason to learn the C ++ language, it is nonsense to talk about the "correct learning method.
First, let's repeat Bjarne: "Our system is already extremely complex. To avoid the complexity of the C ++ language, we simply don't need the C ++ Linus approach." In all areas where C and C ++ are available, C ++ is a better language than C.
When I say "better", I mean C ++ has a safer type check, better abstract mechanism, and better database than C. Of course, there are exceptions in everything. If project 1 you are working on is not large. 2) No abstract mechanism is used in encoding, or even ADT abstract data types, such as std: complex, which does not contain Polymorphism or inheritance), and RAII does not, the exception is also unavailable.
You don't need a basic library, such as smart pointers and smart containers that simplify resource management. Maybe you can use C. If you do, you don't have to argue with me because I can't refute you. The fields we are talking about here are roughly the areas listed by Bjarne in the "C ++ Application List.
The bottom line is: Remove unnecessary complexity from C ++, leave essential and important language features, simplify the language model, and eliminate historical burdens. Even the opponents of C ++ may have difficulty finding a reason to say "I still don't need C ++ ". In my opinion, there is only one reason for rational opposition to C ++ in a practical sense: the confusions brought by the complexity of C ++ offset or even exceed the benefits of the abstract mechanism and library of C ++ in his specific project.
It is worth noting that a trap needs to be avoided here, that is, once people determine that "C ++ is not good", this reason will "grow your feet", that is, even if we get rid of the complexity of C ++, they may still insist on not using C ++ and find a bunch of reasons for it. I assume you are not such a person. However, perhaps most likely, he would say, "The problem is that the C ++ we are using today is not so concise.) your assumptions are not true ." Yes, my assumptions are not true. However, although we cannot eliminate complexity, we can avoid complexity and short-term growth. This is also the main point of this article. I will discuss it later.
Of course, you may say it now. I still don't need the C ++ language, because I can use D. Or, if you don't need C ++ for a project, you may say that I use Python. First, if your project can be implemented using Java, Python, or Ruby, then using C ++ is a tough option.
What is the value of using a language that represents your project in terms of efficiency is not demanding, so you cannot find too many benefits in terms of efficiency and complexity? Second, if your project efficiency is very important, you may say you can use D.
However, the reality is that D is rarely used in the industry, especially in China. The C ++ language has a lot of existing code. Companies that have already used C ++ for their products cannot rewrite the code in other languages for a long time, as Joel said, he decided to rewrite an extraordinary code base = to commit suicide. Therefore, we should pay attention to the following two obvious facts.
- How to Write C ++ project development and project plan correctly
- Summary Notes on learning and exploring C ++ library functions
- In-depth demonstration of high security of C ++
- Describes in detail how to accurately Write C ++ languages.
- In-depth demonstration of high security of C ++