Why should I learn C ++ programs?

Source: Internet
Author: User

With the development of science and technology in the era, the number of people who study C ++ programs has increased significantly. The following article will provide a deep analysis of C ++ programs, there are also descriptions of the complexity in the C ++ program, hoping to bring you the desired information.

First, repeat Bjarne's statement: "Our system is already extremely complex. To avoid the complexity of C ++, 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. 3) You don't need to connect to the basic library, such as smart pointers and 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 ++ programs ". 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 the C ++ program 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 C ++, 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. C ++ 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:

Fact 1: The C ++ program still has a stable core market in the industry.

This fact does not need to be elaborated. For the core technologies of many large companies, we still need to rely on C ++ to support it. See the C ++ Application List on the Bjarne homepage ). The so-called fact is not necessarily the situation that everyone is most willing to admit, but has to admit it. The C ++ program has accumulated a huge code base, which cannot be overturned overnight. D is indeed better than C ++ in terms of language, but the most important thing is that it has not gone deep into the industry. Maybe the root cause is that there is no support, but this is not the focus of our discussion ). C, according to Bjarne himself, his observation is that the trend in mainstream industry has always been "from C to C ++", rather than vice versa, at least in Europe and America. In China, we can obtain similar information through CSDN recruitment.

Fact 2: C ++ programmers often enjoy competitive compensation.

Yes, this is not a technical article that does not consume human fireworks. This fact is based on the logic of being simple: rare. Andrei Alexandrescu said in an interview that "the most profitable software, such as MS Office, is written in C ++ ". Meng yan also mentioned this fact on his blog. As a technical editor of CSDN, he must be clearer than I do in the industry. So I am not talking nonsense here.

Of course, the above logic does not mean that you are motivated to learn C ++. Everything depends on your interests. Therefore, if you are not interested in the application fields of C ++, this article is not for you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.