In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "which is stronger, C# or C++". In daily operation, I believe many people have doubts about which is stronger, C# or C++. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the question of "which is stronger, C# or C++?" Next, please follow the editor to study!
Confusion 1: why Fetion's previous version of the use of .NET, did not feel very good, and finally gave up .NET to use C++ rewrite. I think the rewritten version is better. Is it because of their poor skills? Is C++ really stronger than C #?
Puzzle 2: why QQ has been using C++ for development. (although C++ was still the most mainstream when QQ was developed, and C # was not so popular.) but the conceptual version of QQ only uses WPF's technology to implement its interface, but the kernel is still C++. Now C# has become popular! Why not have a full C # QQ? Is C++ really stronger than C #?
After the discussion began, some technicians said that it depends on the specific requirements. In fact, there is no problem of efficiency here, and computer efficiency is no longer a problem. If there is a problem with efficiency, how does MSN run? Some people say that MSN is slow? MSN is slow because MSN's server is in the United States, not because it is written in .NET. Fetion, QQ (not only Fetion and QQ, but also a lot of them) are usually developed in C or C++. Why not use .NET? This involves the problem of a user base. Fetion, QQ is an instant messaging software, and his user base is very wide, so there is a problem. If he first prompts you to install a .NET framework when you install Fetion and QQ, are you going to faint? Even if you know what this is? But you can't guarantee that all ordinary people know the .NET framework.
So you might ask, package .NET Framework directly into Fetion or QQ?! Don't be naive. NET Framework is too big. Even if it is really packed, will it take half a day to download it? Then the user experience is very poor! There are cross-platform issues involved, there is basically no cross-platform problem with C or C++, do you use .NET? What about Linux,MAC OS? You can't let your users change OS in order to use Fetion or QQ, can you? So the general official version is written in C or C++. So open source version? this is whatever. You don't have to use it if you like! As for MSN, that's Microsoft's strategy, so it's written in .NET, and the official MSN only supports window (I wonder if there is an official version of another platform? In general, you can only use the open source MSN client on Linux or MAC OS!
The 51CTO editor notes that the above technician's point of view is from the operating system's point of view, that is, the degree to which different systems adapt to different development tools. In particular, the question of how .NET Framework runs in open source systems like Linux.
On the issue of flying credit C++ rewriting, some people expressed different views: "the new version of Fetion, as always, is .NET, and I don't know where it is said to be C++ rewriting, but there is no such thing at all." QQ has to consider the issue of component reuse, and there is no need to replace the well-used core, is it? Overall, .NET should not be as efficient as native code, but the performance gap will certainly not be too wide. After all, virtual machines can optimize code for hardware platforms, while native programs are difficult to do. It is indeed a problem that .NET is difficult to secure the code, but it is also feasible to use various means to make it more difficult to crack. After all, even native programs cannot guarantee the security of the code 100%. " This view supports the wide use of .NET, but also believes that a set of mature development tools, there is no need to make platform adjustments.
C # has one more layer of intermediate language Common Intermediate Language than C++. It generates the computer language at run time and then runs it, which is less efficient than C++ 's direct generation of computer language. In the earliest days, computer programming was typed with a punched note, which was the equivalent of a computer-recognized program compiled by C++.
Net is powerful because it is efficient and easy to maintain (who makes C++ have so many macros, constants and so on). .net is not slow, and it may take longer to load runtime for * times. The execution of general instructions may be only a few dozen percent slower than CCompact +, which is of the same order of magnitude. If the programs written by .NET are unbearably slow, it is definitely not the problem with .NET. However, .NET programs take up more memory, I agree, who asked to load the virtual machine, who let the type with so much metadata, I am afraid that all virtual machine languages are not much better.
Some technicians put forward this question mainly as a tradeoff. Managed and packaged code is bound to be of great help to programmers. Think of the days when programmers fought for memory leaks. C++ is very good, just like giving you a magic iron. What kind of sharp weapon you want to build, you can build it yourself, but it's not good to build it. As for C #, I give you a half-sharp sword, and you go to fight, but no matter how good your force is, if you encounter a sword sharper than you, you will admit bad luck.
Encapsulation brings us great benefits, things are divided into categories, which is in line with everyone's habits, while C and C++, everything comes from the core, from the core, this is in line with the thinking of those creators! So the core of a lot of things is Craft, and as for interfaces or rapid development, it still takes time, but creators are scarce, and if everything is done by creators, the times will go backwards.
Considering the issue of efficiency, I think there is no need to worry too much about scientific calculation or simulation, as said by one of the above buildings. As a matter of fact, there are not many programs that let us have sub-cards.
At this point, the study of "which is stronger, C# or C++" is over. I hope I can solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.