I see C ++CLI and .NET

xiaoxiao2021-03-06  72

Recently, C / CLI became the focus of domestic programmers, because one of its developers, Stan Lippman came to China to open the technical conference, and "Programmer" magazine published Meng Yan's exclusive interview with this person. So the software industry is in a time, and the people are full of people, and all kinds of statements are also endless. This interview is placed on the blog of Mengyan. It is quite a lot of stickers (I am afraid there are hundreds of people). Many people reveal the dish of C / CLI and even contemporary, and more fires are also bigger to Stan Lippman. Crack, saying that he is Microsoft's shameless advocacy cloud cloud. I have no research on C / CLI, and I have not developed on .NET, I have been introduced to the introduction of Technical Daba, but I still want to talk about my own opinion (I don't know how to talk? Hehe , Listen to it).

On choosing the development language, I am a very conservative programmer, my most intellectual language is C / C and assembly, the most developed tool is Visual C . By the way, I have been engaged in and the most interested field is the development of game development. From Microsoft announced that .NET has been in a long time, I have a great contrast between it, think it is a huge monster that swallowed everything, ugly, bloated and ambitious. As for C #, I have no contact with no contact, it is a freak. I think, in China may have this blind hostile mentality as many people like me. Why is this? Now, the most important reason is nothing more than one, that is, Microsoft's technical update is getting faster, even if it keeps the distance follows, it is also very worried about many people, so we are gradually scared, but I have a hatred. Just like the minister who is anti-reward in the end of the Qing Dynasty, only they have the ability to kill reforms, and we don't.

In recent time, since I hope to do a point of studying formulation and object-oriented technique, I started learning for EIFFEL and contractual development methods (Design By Contract). The people who have heard of Eiffel in China may not have much, but I heard that "Object-Oriented Software Construction" ("Object-Oriented Software Construction") The person should be a lot. The book has won the 1997 Jolt Award. It expounds in detail to all aspects of object development methods. It has made extremely detailed analysis of many important concepts, and Eiffel is a set of books in the book. Object-oriented marker method in the whole process of software development. You can look at Eiffel as an object-oriented programming language (although it is not just a programming language), the most important thing in this language is introducing the concept of "Contract) and has established this concept. Language mechanism. Understanding the form of a formal method knows precondition, postcondition, invariant, and Contract is the corresponding objects in Eiffel. In human society, the contract has legal effect, which clearly provides the signs of rights and obligations to provide a basis for building a social and rational and rational and rational. Similarly, the contract can accurately portray their semantics through the rights and obligations of various operations in the program, and thus constructing high quality software has a solid soil. How much I hope to apply it in other languages ​​after I learned a contractual development idea, especially C / C . However, C / C does not directly support the mechanism of Contract. Meng Yan once wrote ("Design By Contract Principles and Practice") This section describes how to simulate it in C , but the limitations are too large, and many key ideas cannot be used. Just at yesterday, I saw an article "The Significance of .Net" written by Bertrand Meyer in 2000, saying that they have developed a .NET-based software, which allows you to be .NET components ( Whether it is written in any language and class methods, PRECONDITITIONS, Postconditions, and Class Invariants, like the same thing in Eiffel, the most critical is that you don't have this .NET component source code in this process. Contract Wizard uses the compiled components to change its metadata, then generate a new .NET component with contract. That is to say, I can use all the components I need (no source code, no matter what language written), it is greatly improved the quality and safety of software. Quality. Quality and safety. Very magical, isn't it? And all of this will give the components mechanism to be described in .NET.

In fact, this article in MEYER also introduces other aspects of .NET, such as Language Interoperability, which allows programmers to inherit classes written with different languages; such as object model VOS (Virtual Object System), Meyer calls Microsoft "Strive for a general and appropriate foundation for various language definitions", "and this foundation will play a bridge between different languages" (IT IS An Attempt to Define A Suitable Common Base That Can Serve As a Bridge Between All these Languages, and Others.); such as virtual machines, Microsoft enhances the performance efficiency of MSIL (Microsoft Intermediate Language) on the CLR, which can be not obvious from quake2 .NET version Efficiency loss is verified. Throw away the prejudice of Microsoft, is it in a pure technical point of view, isn't. Net not embodied in a platform that reflects vision, vitality and interest? And as ECMA (European Computer Manufacturers Association) standardizes CLI, it has become an open platform, and the famous Mono project is its implementation on Linux. Some friends may say not to take technical authority, especially foreign authoritative English articles to scare people. I won't be fox fake, but I have such a master in the software field. If he is rational, objective and responsible, why can't I believe him, but I can't recommend it to everyone, let everyone have more Think? C / CLI is a positive attempt, in my opinion, it is desired to maximize the various advanced features of the .NET, while maximizing the C programming model. This is a good thing, especially for those who like C and must work on the .NET platform. I hate C / CLI friends, don't be too excited, after all, you still have the right to choose Native C , no one forces you. For me, due to the requirements of game development, I will still stick to C / C and ASM positions in a quite long time, but I am also very interested in exploring C / CLI this fresh mixed-blood language. Even in the field of game development, many technologies of .NET platform are also worth learning, in fact, there is an early game to use technology similar to .NET. For example, Unreal, its logical part is written in the unrealscript scripting language, and this script runs on a virtual machine that provides multi-thread and memory recycling mechanism, and it can also be good with C / C in the source level. Operation (such as using a Class written by C in the script). Although the development of these technologies has been a year, .NET is undoubtedly a new and very valuable reference object.

转载请注明原文地址:https://www.9cbs.com/read-92519.html

New Post(0)