[Effective C++] item 01
Viewing C++ as a family of languages is essential
C++ is a multi-paradigm programming language
-
Initially started as C with added object-oriented features
-
Currently supports procedural, object-oriented, functional, generic, and even metaprogramming
Generic programming: A programming paradigm that maximizes reusability by being data type agnostic, meaning that one value can have multiple data types.
Metaprogramming: writing and modifying programs that treat themselves or other programs as data, sometimes referred to as compile-time methods of doing some of the work that needs to be done at runtime.
-
C++ should not be viewed as a single language, but as a family of languages, each with their own rules.
-
C: Many things originated in C, but C++ often provides a better approach and can be used to a more limited and safe extent.
-
Object-oriented C++: The core of C++, where classes exist, and where object-oriented design comes into play most directly.
-
Template C++: Less frequently encountered and rarely interacts with mainstream C++. It has given rise to a powerful paradigm called TMP.
-
STL: Template library, but a very special case; there is a specific way to use STL and you must follow its rules.
-
-
If there is a transition between the above sublanguages, you may find yourself in a situation where you have to change your strategy.
-
C++ will be easier to understand if you understand that it is not a single language, but a collection of sublanguages, each with their own rules.
댓글 작성
게시글에 대한 의견을 남겨 주세요.