At the beginning, Microsoft will use Java as a language that solves the problems existing in C and C , does not care and continue to maintain and train their C and C technology and programmers. The next unfortunately, just as Microsoft tries to expand the Java function on the basis of Visual J , and the Windows operating system is closely combined with the Windows operating system, SUN has proposed the legal proceedings to violate the terms in the license agreement. The final result is that Microsoft has to stop its development of Visual J products. (Microsoft is still selling Visual J , but there is no new version release since October 1998, and there is no Visual J position on the .NET platform) The next thing is very clear, Microsoft has developed C # Language. The next part will discuss the similarity of C # and Java.
C # and Java's difference
C # The most compelling place is its difference between Java rather than its similarity. The following mainly introduces the difference between C # distinguishes between Java, and the characteristics of Java completely.
Intermediate language
When MSIL is compiled into the final machine code, Microsoft is very flexible. Microsoft is very cautious about saying that MSIL is not interpretial, but is compiled into machine code. Because developers have such ideas: Java programs are born to run slower than the C program, so this suggests that MSIL-based program is better than interpretation Java bytecodes. Of course, since C # and other MSIL product compilers have not been released, then this is not proven, but Java is ubiquitous instant compiler makes C # and Java in effect. "C # is compiled, Java is interpreted" "This is just the skills in sales. Java's bytecode and MSIL code are similar in a similar assembly, performing these intermediate codes at runtime.
Integration with COM
For Windows-based C # developers, the biggest harvest is a non-destructive integration of COM, COM is a Microsoft Win32 component technology. In fact, any language on the .NET architecture is ultimately to write COM client and server-side programs. The class written in C # will also be used as a subclass of COM components; resulting classes can also be used as COM components and as subclasses of COM components.
Microsoft's goal is to enable more and more languages to access components and make these components in the .NET architecture. Several vendors have begun to develop programming languages that support .NET functions, such as Cobol and Haskell. Developers can choose different languages to solve different problems. More importantly, developers do not have to learn new languages for the use .NET architecture, you can choose a language they are familiar with.
to sum up
The first and second parts of this article do a shallow general introduction to C #, mainly its motivation and similarity to Java. The third part will contribute to the language characteristics of C #. Examples have explained that both C # and Java are similar, and they are very different, there are many subtle semantics and design differences, suitable for different technical and market environment, and talk about Microsoft's standardization to C # And its impact on Java.