Master's explanation: Why is the 35-year-old C ++ still dominant in the development field?
Bjarne Stroustrup designed the C ++ language in 1979, and this general-purpose language for system programming has become one of the preferred solutions for developers around the world. Despite the frequent impact from Java, JavaScript, Python, Go, and the Swift language just announced by Apple, C ++ remains stable and lofty.
As a technical expert at Morgan Stanley investment and a professor at Columbia University and Texas Emy of agricultural machinery, stroustrup discussed with us the role of C ++ in today's technical environment and new things in the software development field-including Google's Go and Apple's Swift language.
Reporter: What do you think of C ++'s Role Positioning in today's technical environment? What do you think of scripting languages like Python and JavaScript, Java, and Google Go? In the face of a large number of different competitors, how can C ++ survive, continue, and develop in today's diversified ecosystem?
Stroustrup: & p; This is a good question. Many people expect that the C ++ language will quickly die out 20 years after its birth, but the actual situation is that it still maintains a vigorous development trend. Basically, no other language can handle complex tasks at an excellent speed like C ++. If you are interested in some embedded fields, if you have been involved in image processing tasks, if you have used certain telecom applications, or if you have been involved in certain financial applications, C ++ is still dominant. Of course, if you focus only on applications or similar fields, you may not be able to feel the existence of C ++-these are not the main platforms for C ++. On the contrary, C ++ is the activity space for areas such as Google, Amazon, and search engines that really demand high performance.
Reporter: Google's Go language is gradually attracting high attention from the industry. What do you think of Google Go?
Stroustrup: & p; for now, Go seems to be one of the languages that can play an excellent role in certain specific tasks. However, once you focus too much on specific tasks, the programming language will sacrifice performance and lose some of its general capabilities. However, of course, the real results will be verified by time and market.
Reporter: Some of these new scripting languages are designed to lower the threshold for developers to use. Do you think C ++ needs to pay more attention to other demands?
Stroustrup: & p; oh, of course. C ++ is designed for more core applications, and always needs to be used in concert with scripting or other languages. When I first developed this language, my starting point was to make C ++ a programming solution that can effectively bring excellent performance. Later, I used Unix shell as my script language. This is my personal processing method at that time, and is also the mainstream usage method in most cases. C ++ is designed for high performance, high reliability, small size, low energy consumption, and other advantages. I am not paying too much attention to enthusiasts or quick application development needs, which is not the focus of C ++.
Reporter: Apple released its Swift language in June 2. With the strong support of apple, Do you think Swift will become an important programming language that will attract developers' enthusiasm?
Stroustrup: & p; I think so. Developers have already put a lot of effort into Objective-C, and today's Swift language will once again set off a new upsurge in the development industry.
Reporter: I have seen a lot of publicity about your latest keynote speech recently. "C ++ faces two major challenges: helping programmers solve pressing tasks closely related to performance, scale, and reliability. It must also help programmers compile easy-to-understand and maintainable code with higher production efficiency ." What do you think of these problems?
Stroustrup: & p; I hope to explain the following two facts in this keynote speech. First, how to extract and use hardware resources in depth and effectively; second, how to use the new mechanisms in C ++ 11 and C ++ 14 to simplify the difficulty of writing new code.
This year we will have a new subversion based on this standard, that is, the C ++ 14 we mentioned earlier. Currently, Clang and GCC have started to release this version. In my personal description, C ++ 14 has actually improved our attempt in C ++ 11. When we want to release a large product like C ++ 11, there will always be some features or features that cannot be incorporated into it in a timely manner-the reason is simple, and the release date cannot be compromised. In addition, there are also many problems that need to be identified after we integrate all the components and try them. The role of C ++ 14 is to deliver those that have not been implemented in C ++ 11, but have already been developed to users.
Compared with the lambda expressions we provide in C ++ 11, the new version of lambda provides common features, and these anonymous functions can use semantic movement for capturing and other functions. These are purely technical content-functions, returns, type derivation, and so on are all improved like lambda expressions. Here, the "constexpr" Composite Function refers to the functions that can be executed during compilation-can now be easily included in the For loop. We also provide multiple types of templates and improved the memory initialization mechanism. In addition, user-defined constants have become a reality.
Reporter: What do you think of security issues in programming? How can developers ensure the security of their program achievements as much as possible? Is C ++ more secure than other languages?
Stroustrup: & p; I highly recommend hardware-assisted security solutions. From the perspective of programming language, if you want to write an outstanding program, you must first write type security in the code. Of course, you can do this through C ++. Do not play with low-level features endlessly, or rely solely on general-purpose interpreters that cannot precisely track their progress. Basically, security is a systemic problem.
Reporter: Do you have any additional comments on C ++ or other things in the software development field?
Stroustrup: & p; we should be committed to creating a more professional ecosystem in the software development field. In our social life, many key components can be said to be indispensable, and the normal operation of these components often depends on the actual performance of the software. We also need to consider our system as a whole, and the language and relevant work chain are components of it. We need to pay more attention to the implementation methods in the teaching work of developers to ensure that the software reliability is fully emphasized.
What are the reasons for the long-term dominance of idealism in the field of history?
① Identify the root cause. The process of human cognition is subjective, simple, straight-line, and specific, which leads to the separation of subjective and objective, and the separation of understanding and practice. This is the root cause of the emergence and existence of idealism. Subjective idealism exaggerate experience on one side, reversing the relationship between feeling and object, while Objective idealism exaggerate concepts and other rational understandings on one side, reversing the relationship between concepts and objects.
Lenin pointed out that idealism is an fruitless flower, but it does grow on the tree of human understanding. This is because, in view of the root cause of understanding, it is a simple, straight-line, and one-sided way of thinking that leads to the separation of subjective and objective elements in people's thinking and the disassociation of understanding and practice, as a theoretical viewpoint, idealism cannot effectively guide people's practical activities to transform the world. Therefore, it can only be the "no practical flowers" on the tree recognized by humans ."
② Class root. The subjective and one-sided mistakes produced by understanding consolidate these mistakes out of the interests and political needs of the reactionary or conservative class and intentionally distort the true colors of things, this is the reason for the existence of idealism.
For reference only
Why can the Han nationality still take a dominant position after the feudal unification hegemony in the Late Eastern Han dynasty! In ancient Rome, the destruction of a dynasty was replaced by another nation?
This should be caused by the willingness of geography. The east of Mainland China is the sea, the west and the south are the Himalayas, and the North is Siberia. Because of the cold climate, it is widely used, it is not easy for China to communicate with other nations, and it is difficult for war to occur. The history of China can only be written by Chinese people.
In fact, it is not that Han people have been dominant. For example, the Yuan dynasty is Mongolia and the Qing Dynasty is Manchu. It is only possible to say that Han people are the main component of China's multi-ethnic groups, farming has started for a long time, and living conditions are better than those of nomadic people. Therefore, Han nationality breeds faster than other ethnic groups, and thus becomes a major part of the Chinese nation.
The fifty-six nationalities in China are part of the Chinese nation, so it should be said that the Chinese nation is dominant.
This is my personal idea!