Q

Didn't Microsoft just copy Java with C#?

Didn't Microsoft just copy Java with C#? What's the difference?
Having programmed in a dozen different languages, I'm tempted to say "C# and Java are the same. Learn one or the other it doesn't matter that much from a macroscopic language syntax, semantics perspective". But that's the curmudgeon in me and this is "Ask the Expert" not "Ask the Curmudgeon". C# is very similar to Java and was indeed developed to address several of the common deficiencies noted in C++ when compared to Java. Most notably developers point to manual memory management as a key impediment to productivity when working with C and C++ (both in coding and subsequent debugging). Both Java and C# free the developer from the task of having to manage their own memory. Pointers are still possible in C# but highly discouraged. Like Java, the C# syntax is very reminiscent of C and moving from one C variant to C# is fairly trivial. C# differs from Java in a number of spots mainly addressing (fairly minor) complaints from developers about the Java language. Examples of these features include generics (recently implemented in Java and coming in the next release of C#), delegates, and primitive types as objects.

There are a number of good books and articles that detail the specific language features in C# and how they compare to Java. It's sufficient to say, however, that if you are a Java programmer you will find the learning curve for C# to be quite short. For practical purposes the languages are the same. There is one important non-technical difference that's worth noting. In a strange twist of fate, Microsoft has found that the only card it really holds to "fight" Java in the marketplace is open standards. Microsoft is aggressively pursuing the standardization of the C# language and the associated Common Language Interface (CLI). They have already been blessed by ECMA and expect to establish C# as an ISO standard by January 2003. By comparison, Sun has refused to submit Java to standards bodies and instead manages the language through the Java Community Process (JCP). Look for Microsoft to make a big deal about the standardization difference between C# and Java and lots of references to Java as a closed, legacy tool. An interesting point is that for years Microsoft has not adhered very strictly to the ANSI C++ standards. Within the last month Microsoft has announced that they will be the most ANSI compliant C++ implementation in their next Visual Studio release. Microsoft is tightening their standards story with respect to C++ to close a hole in their armor in preparation for sticking it to Sun and Java on the standards front.
This was first published in December 2002

Dig deeper on Visual Basic .NET Web services

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchSoftwareQuality

SearchCloudApplications

SearchAWS

TheServerSide

SearchWinDevelopment

Close