View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Discussion 1 -- David Worsham

Article: Can C# replace java in CS1 and CS2? by Stuart Reges

This article compares C# to Java for use in introductory CS courses. The overall conclusion is that C# is the better language for several reasons.
While not knowing C# exteremely well myself, I agree with this assessment. C# was created after Java, and thus Microsoft programmers had the benefit of being
able to learn from Java's weaknesses and repair them in C#.
A notable example of this mentioned in the paper was Java's "wrapper" classes for primitive types like int. In Java you must explicitly pack and unpack
primitives into these wrappers in order to use them effectively. In C# this is done automatically. Another example is the relative difficulty of reading
user input in Java with In C# this has been made signifcantly easier with Console.ReadLine.
The C# language is more complete than Java, including things like enums (albeit these now exist in Java 1.5) and operator overloading. However, this extra
functionality is optional, so it does not confuse newer students. If an instructor so desires he doesn't have to teach these.
Travis Sheperd, in his post here, mentioned how Java is now seen as superior to C++. Mainly this is due to ease of use. I believe that C# is the answer to
this. It is a lot like C++, but adds in all of the benefits of Java while at the same time extending the language and patching weaknesses. At this current point
in time, it seems to be a near perfect OO language (for practical is of course not "pure" OO). I believe both languages will continue to evolve
and compete with each other, and in the end this can only benefit programmers and consumers, as we get high quality OO languages.
In conlusion, C# is a more "complete" language than Java, simply due to the fact that it is newer. Java may catch up, but for now this completeness allows
programmers to be more expressive with their code, and to accomplish things more quickly and efficiently than they could in Java. Toss in the interoperability
with other languages that the CLR provides for C#, and you may have a winner on your hands.

Cited Travis Sheperd's swiki post

Link to this Page