C ++: Reading Notes in "design and evolution of C ++ language" (1)

Source: Internet
Author: User

This is why C ++

-- Reading Notes on the design and evolution of C ++ language (1)


C ++ mostly comes from problems encountered in the actual research process of Bjarne stroustrup. To solve such problems. He is a pragmatic. It is precisely to solve the actual problem that C ++ has a class, so as to have compatibility with other languages.

"The concept of classes enables me to map the concepts in the application directly to the language structure. It is more readable for my code than any other language I have ever seen ". Yes, it is precisely because of this attractive feature that there is no reason not to add this feature to a new language. This advantage is particularly prominent when developing large systems.

Compared with Java, C ++ does not seem completely object-oriented. In C ++, we can still find traces of a large number of procedural languages. Why? You can find many answers online: to be compatible with C. Yes, it is indeed to be compatible with C, but there is something else, that is, the personal thought of the father of C ++-compatibility. "I never want to implement a unique design concept through a restricted programming language definition area. People's way of thinking is so rich and colorful that attempting to implement a single idea always has more disadvantages than advantages. In this way, C ++ is intentionally designed to support a variety of styles, rather than emphasizing the 'one truth path '". With this belief, C ++ naturally becomes a language compatible with other languages, not only compatible with the above C language, but also compatible with other languages such as assembly. The benefit of compatibility is that you can solve specific problems in a specific language. When it comes to solving a specific problem, the advantage of a language may be very obvious. So what is the reason for me not to use this language? There is only one possible answer: maintainability. This is a problem. However, when efficiency or other advantages are especially needed, maintainability often has to reduce its importance.

Portability is also a manifestation of Bjarne's inclusive thinking. Therefore, the portability of C ++ is beyond doubt. From UNIX, Linux to Windows, and a variety of embedded development, we can see C ++.

Related Article

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.