In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to understand the core principles of C++". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn how to understand the core principles of C++.
In.0: Don't panic! (don't panic)
Take the time to understand the impact the guidelines may have on your program.
These criteria are designed according to the principle of "subset of superset". They don't simply define a subset of C++ for use (for reliability, security, performance, or whatever). Instead, they strongly recommend the use of several simple "extensions" (library elements), which make most of C++ 's error-prone features redundant and explicitly prohibited (our rule set).
These specifications emphasize static type safety and resource security. For this reason, they emphasize the possibility of scope checking to avoid indirect references to null pointers, avoid generating wild pointers, and promote the systematic use of exception handling (through RAll). To achieve these effects, and to minimize incomprehensible code that is a source of errors, these rules also emphasize the practice of simplifying and hiding the necessary complexity behind well-defined interfaces.
[RAll]-resource acquisition is initializatio resource acquisition is initialized
Translator's note: the word static is important, which means that these problems can be solved at compile time rather than at execution time. This can be said to be the goal that C++ has always pursued, and it is also one of the biggest differences between C++ and C language.
Many rules are established by convention. We don't like rules that simply say "don't do that" but don't offer other options. As a result, some rules can only be supported by heuristic checks, not accurate and mechanically verifiable checks.
These guidelines focus on the core of C++ and its usage. We hope that larger organizations, specific application areas, and even large projects will require further rules, possibly further restrictions, and further library support. For example, hard real-time programmers are usually not free to use free storage (dynamic memory) and are severely restricted in the selection of libraries. We encourage such more specific rules to complement the core guidelines. It sounds good to build your own perfect small-scale basic library and use it, rather than lowering your programming level to assemble the code.
[hard-real-time]: usually refers to a real-time system that is priority-driven and can provide preemptive scheduling with time certainty.
These rules are designed to allow gradual adoption.
Some rules are designed to improve multiple forms of security, while others are designed to reduce possible accidents, many of which are both. These accident prevention rules often explicitly prohibit fully legal C++. However, when there are two ways to explain an idea, one is presented as a common source of errors and the other is not, we try to direct programmers to the latter.
At this point, I believe you have a deeper understanding of "how to understand the core principles of C++". You might as well put it into practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.