Notes for learning C ++

Source: Internet
Author: User

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.

I have read countless articles describing the complexity of C ++, and I have discussed the complexity of C ++. I wrote two articles about C ++ ). I have always felt like a blind person. As a reader of "Why C ++" criticized, I did not specify in my article what is C ++'s "non-essential complexity ".

Of course, I can know it by myself, and even if I have been in contact with C ++ for a while, however, new users or even non-beginners have no specific understanding of what I call "non-essential complexity, this leaves the article "Why C ++" out of its original intent-oriented to all C ++ users and learners.

For the same reason, after writing the article "How should you learn C ++", Mr. Meng asked me to write a series of articles for "programmer, let me introduce my attitude and understanding in the process of getting in touch with C ++. Although I was very happy to agree, I still had no choice but to accept it three months later.

Why? Because I don't think the real nature of the problem is clearly touched; so I haven't done anything until now, so I don't want to talk nonsense, except for being able to read as a novel, it may not be of practical use to those who really want to learn or even use C ++.

However, such an idea has always been placed in the subconscious. A while ago, I communicated with Bjarne and talked about some ideas about the complexity of C ++. I summarized the complexity of C ++ in my email, and I felt a lot clearer. The purpose of this article is to convey a specific and clear understanding of the complexity of C ++. With this understanding as a support, we can then export the best practices for learning C ++.

Now, almost everyone who learns C ++ knows that the core issue of C ++ is its complexity. Even those who are not in the C ++ community themselves know that this is a fact. The eyes of the masses are bright, not to mention the fact that this is too obvious.

I have read countless articles describing the complexity of C ++, and I have discussed the complexity of C ++. I wrote two articles about C ++ ). I have always felt like a blind person. As a reader of "Why C ++" criticized, I did not specify in my article what is C ++'s "non-essential complexity ".

Of course, I can know it by myself, and even if I have been in contact with C ++ for a while, however, new users or even non-beginners have no specific understanding of what I call "non-essential complexity, this leaves the article "Why C ++" out of its original intent-oriented to all C ++ users and learners.

For the same reason, after writing the article "How should you learn C ++", Mr. Meng asked me to write a series of articles for "programmer, let me introduce my attitude and understanding in the process of getting in touch with C ++. Although I was very happy to agree, I still had no choice but to accept it three months later.

Why? Because I don't think the real nature of the problem is clearly touched; so I haven't done anything until now, so I don't want to talk nonsense, except for being able to read as a novel, it may not be of practical use to those who really want to learn or even use C ++.

However, such an idea has always been placed in the subconscious. A while ago, I communicated with Bjarne and talked about some ideas about the complexity of C ++. I summarized the complexity of C ++ in my email, and I felt a lot clearer. The purpose of this article is to convey a specific and clear understanding of the complexity of C ++. With this understanding as a support, we can then export the best practices for learning C ++.

Why should I learn and use it?) C ++

Obviously, if you cannot find the reason for learning C ++, 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 C ++, we simply don't need C ++ Linus.

"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.

Even the ADT abstract data type, such as std: complex, which does not contain polymorphism and inheritance, is not used, RAII is not used, and exceptions are not used. 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 ++ ". 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.

  1. Differences between standard input implementation methods in C and C ++
  2. How does the C ++ compiler allocate storage space for Const constants?
  3. Basic Conception and method of C ++ Class Library Design
  4. Several Methods for converting C ++ Language
  5. How to better compile C ++ code

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.