Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
Discussion 1 - Jeff Watson
Article: Can C# Replace Java in CS1 and CS2? – by Stuart Reges
Available via the ACM Digital Library (accessed through Georgia Tech Library)
In this paper, Reges explores the possibility of using C# rather than Java in introductory computer science courses. He mentions several times throughout the paper that the two programming languages are very similar. He begins by discussing the features that the two languages share, just a few of which are the use of interfaces, exceptions using try/catch, and threads. He devotes the majority of the paper, however, to discussing differences between the two languages.
Some of the features present in C# and lacking in Java may allow for students with little or no programming experience to more easily learn to program with C# as opposed to Java. C# includes a main method very similar to the main method in Java, but C# also includes a much simpler main method as well. Although this may seem trivial to experienced programmers, this simpler main method may be helpful to novice programmers who may be confused by the parameters of the traditional main method in java. C# also includes a foreach loop that is not present in Java. This could provide incentive for novice programmers to include iterators in the structures that they define, thereby introducing what is typically a slightly more advanced topic (iterators) at an earlier point in the course (same time as for, while, etc.).
The main drawback for using C# rather than Java in introductory programming classes, or any other class for that matter, is that C# is not a great multi-platform programming language as Java is. Students who program in Java are generally encouraged to choose among several different operating systems and pick whichever they like best to program their assignments in. C# limits students' opportunities to program in different environments.
Although many similarities exist between the two programming languages, some of the differences prove to be important to consider when deciding which language to use for introductory computer science courses. These differences affect the order in which students learn different programming concepts and the ways in which students learn these concepts. This will likely affect the students' future programming practices. For example, students who learn C# as a first language may become more comfortable with iterators because of their use in conjunction with foreach loops and therefore use iterators more often in practice than a student who had little use for iterators when learning how to program in introductory courses. Additionally, students who take classes that are taught in Java and who are encouraged to experiment with programming across different platforms may develop a better understanding of similarities and differences of different platforms and be more comfortable programming across a variety of platforms. I will admit, however, that the differences between Java and C# are few enough as to not cause much of a rift between those who are introduced to programming through one of these languages vice the other.
I also read Mark Shalda's discussion of "A Comparison of Java and C#." He mentions several specific differences between the two languages (operator overloading in C#), but also makes sure to point out that there are similarities as well (large set of libraries for each language). He also points out that although Java is a free interface and C# is not, this should not be a problem for many students because of the MSDN-AA program that allows students to get C# free of charge. He concludes by saying that he sees no good reason for C# to not be used rather than Java. I agree with his conclusion, but at the same time, I am not convinced that the few benefits of C# over Java for novices are enough to warrant a change in introductory computer science curricula from Java to C#.
This discussion is also available on my "Who's Who" page.
Link to this Page