C # introduction

zhaozj2021-02-17  46

Translation Many Bamboo South Sea C # introduces that Microsoft announced its latest programming language C #, which is an object-oriented programming language, which will be launched as part of Visual Studio. C # (pronunciation "C-Sharp") maintains both familiarity familiar in C , and also contains a lot of efficient code and object-oriented characteristics. According to Microsoft Products Manager, C # language will bring more efficient RAD development methods to programmers based on keeping C / C flexibility. It can not only be used for the development of web service programs, but also develop powerful system-level programs.

Microsoft has not officially announced this new language technology, which will appear in Test form in Visual Studio 7 that is intended in the Professional Development Conference in mid-July. Visual Studio 7 will be officially released at some time next year.

Layman introduces that C # contains technology that makes XML programming more relaxed. Microsoft will allow its next-generation tool software, operating system, and application to support XML technology.

The new programming language will also contain virtual machine devices. Microsoft officials have disclosed that C # technology is not associated with the company's Java competition technology Cool last year. Microsoft official refuses to answer whether to provide a version of Microsoft Designed Window Java Visual J in Visual Studio 7.

C # characteristics

Now, Microsoft still continues to refute its competitor Sun to complain it to change the Java language lawsuit, while the anti-monopoly allegation of the United States is embarrassing to the end, but at the same time, Microsoft's genius programmers also have a technology. Measures for remedies. That is the C # language they have developed. This is a very similar to the language of Java. Microsoft has known even in Microsoft camps. There is also a considerable part of the people like Java language, so this time I simply use C # to meet their wishes. This is a very perfect language for a variety of operating systems and is closely combined with WINDOWS.

Microsoft means that this new programming language is not for Java, but it will be C innovation. And this is one of the two main goals pursued by Java (another target of course is portability). Microsoft has always dreamed of developing languages ​​that can compete with Java on Windows NT systems. C # automatic memory management and C language syntax used as Java seem to make this ideal a reality.

Microsoft said that C # is a "simple, popular, object-oriented, type-safe" programming language that is derived from C and C , and C # is integrated with the high efficiency of Visual Basic and the powerful function of C . But is this statement accurate? Due to the C # structure is very like Visual Basic's ActiveX, it is clearly rushing from the RAD developer. At the same time, "C # provides C powerful features" this statement is slightly exaggerated, and it is likely that it will become a short check.

Update to a target interface, Microsoft is called "inheritance", of course, "inheritance" is "object". However, although "Object" said that we often encounter, few people really understand its meaning. Microsoft's users, even its own employees often mix "objects" and "interface". So Microsoft simply uses the interface to define various objects. As a result, "Object-Oriented Programming" (OOP) has been messy by Microsoft. Now, Microsoft moves in a big step (although it is still very careful), it is integrated into the development tool based on the "object" of the interface. However, it has been able to pass the head, and it even called "inheritance" on another object interface.

This "inheritance" will bring to programmers to language-independent - as long as the interface maintains its compatibility, the objects written with Visual Basic can also operate well in C # and C . However, this feature is at the expense of the real OOP technology and the portability of the platform. Each object is compiled and registered to the Windows subsystem, as long as you can access this subsystem, you can access this object. bring it on! Welcome to the world of .NET and NGWS! - The Windows platform has never finished completely producing such complete dependence. Their motivation must of course be suspicious of Microsoft's prejudice to Microsoft, of course, completely relying on C # to this technology. In fact, C # will be the most perfect product of Windows. The database that is sleepy around Java SDK, MFC and SET has become. You want to put anything in C # (no matter what language), you can use Windows running libraries as long as you build and pack under Windows .NET subsystem.

Enter .NET with msil

When people access the USENEN or some newsgroups, there will be some questions such as new language and platform validity. What time and efforts can solve these problems? Of course, if there is no firm fact and convincing evidence, even the most helpful respondents, the authority will reserve the opinions on his assertions. I didn't participate in this year's professional developer conference (PDC), so my discovery is based on feedback from those participants.

People's propaganda to Microsoft has been promoted in the past few weeks, the most basic wrong understanding is that C # is just Visual C improvement versions. It's not that happened. C # and Java have not directly contacted. Its feature setting is the inspiration obtained from Java. Its syntax is the same as Java, from C and C , but its execution is completely new, just rely on the .NET structure.

C # is also not byte code (bytecode). Microsoft's employee Robert. Schistte detailed: "C # compilation program is generated by 'Microsoft Intermediate Language' (MSIL) ... But virtual machines or other similar techniques cannot be used to explain this intermediate language (IL) Conversely, whenever the application load or JIT compiler needs to compile it, the IL will be converted to the local code. Once this conversion is completed, the code that can be executed is actually a local code. "Substance, although this The solution is a bit like the Java program through a JIL compiler, but the final JIT compilation is 100% of the local code, while Java's JIT generated results are different.

C # weakness

This program has also exposed some interesting vulnerabilities in Microsoft to C # and .NET. MSIL is a new feature provided by .NET, allowing very popular programming languages ​​to compile a separate public language. (.NET supported language species is quite amazing). These languages ​​must obey a architecture called "Universal Language Normative (CLS)". Microsoft is called "CLS compatible language and class library interoperable universal language".

Compile all languages ​​to a single public language, allowing "inheritance" to be truly implemented through multiple languages. This is easy to remove the C # may encounter the error concept. The .NET component uses the COM's IDispatch, it only allows the interface to be executed. It is easy to accept more than the previous C # being assessed as an OOP language. It is object-oriented in programming or like Java.

But unfortunately, CLS includes MSIL's shared language foundation, only benefits RAD developers, and harm the core developers of hardware, some people think that the purpose of creating a new programming language is to make full use of it and serve Tryful-tuning execution capabilities, this is not done in the CLS world. Honestly, acceleration is fully utilized never the only goal of many languages. The only goal of many languages ​​(the most eye-catching RAD language like Visual Basic and Java) is accelerating and beautifying development and development capabilities, not just the speed of the run. The Schmit Article mentioned in the Schmit Article includes related and worthless comments: You can specify .NET with C , and use all C features in your code. At the same time, because .NET cannot verify that C code is safe at runtime, this language does not follow the CLS specification, and the procedures written inside are limited. As a response, Microsoft adds non-standard management extensions to Visual C . The code written with these extensions can comply with the CLS specification.

C # will take the Microsoft to the younger. Because all project writing will rely on MSIL and CLS JIT compilers. This way, C # or any MSIL front-end language is fast than Java. But unfortunately, the optimization of programming and compiler level cannot be fully utilized on non-soft platforms, wanting to expand .NET on a non-Windows platform, and then make full use of them is not realistic.

Java is the competitor of C #

Although .NET is made by Microsoft, it is not only available on Windows. Microsoft is ready to try to provide traditional help for those COM objects (all OLE, ActiveX, etc. will become a Legacy platform after the next generation VIUAL Studio is launched. But .NET does not build around COM. The new platform will undoubtedly supplement COM, and it is seamlessly cooperated with it almost skydomas, but it will not rely on COM. This indicates that this structure itself can be launched by Macintosh, UNIX. Beox. This is named because the CLS architecture is standing independent, C # will use and all databases that follow CLS are also stand-alone. That is, they all follow CLS, if a native MSIL compiler is valid on the platform, then they can compile any structures at runtime. Microsoft also actively got to accept ECMA standards, and their previous JavaScript has been accepted. When Visual Studio. Net is launched, development groups will definitely have different reactions. "Microsoft has developed a new platform", which has scared the people who have been the worry of Microsoft Platform. More importantly, however, the C # or .NET strategy does not make a big threat to the original C , then there is a reason to deliberate C # and .NET will be a strong competitor of Java. Consider the opposite side: Java VM Runs the application by translating the bytecode code. CLS compiles this at the time. Java platforms only support Java language. .NET only supports MSIL, but some unlimited advanced languages ​​such as C #, Visual Basic, even Eiffel and Cobol boot MSIL. Java uses the implementation of the truly OOP technology. This is true for MSIL, C #. On the Java platform, simply move the flat file, the project can be expanded to the product directory. It is said that the .NET platform project can also be easily expanded without a project based on Registry-Happy COM. Perhaps the true advantage of the Java platform is only in politically correctness - it is not Microsoft, and there are currently thousands of persistent religious followers.

View of the author

Ironically, although I know Java and C #, I am still the title of a high-level Visual Basic programming. People think that a VB designer like this will be against Microsoft's madness. But I have to face reality. Honestly: VB is a RAD development tool. Don't just carefully, don't remember the real object. Quickly get the result is the weight. In the commercial world, pure technology and results are not always able to match, and short-term results are often better than long-term productivity. This is unfortunate, but in many companies, this is the fact. These companies are the main users of C #. Will I use C #? Of course it will be used! I am using Visual Basic now, but why do you transfer to C #? I appreciate the exquisiteness of Java and OOP languages, but because of all projects I have conducted, the short-term results have been better than long-term results, I have no time to consider replacing the Windows platform. However, if you have a pure technology and faith perspective, Java and C programming are sufficient reason to pay attention to C #, which is another trick of Microsoft to maintain monopoly. Finally, C # is good or bad? Then, because "inheritance" here refers to the re-execution of the interface interface, it is not true OOP. If you are Microsoft, or if you rely on Microsoft technology instead of switching the platform, the C # is great, and will provide a good foundation for the tips on the VB programming, Java and C (because the syntax is shared of). However, because Microsoft will fully introduce C #, the supporters of Java and C will definitely design new languages ​​and hold hit. At the same time, C # does not necessarily change to other platforms, and cannot really reflect the value of OOP, and even hazardly harmful to beginners of OOP.

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

New Post(0)