Why Not C#

Computer Science Teacher
Computer Science Teacher - Thoughts and Information from Alfred Thompson

Why Not C#

Rate This
  • Comments 11

Someone recently passed on same objection to using C# as a first or otherwise early programming language. I hear these sorts of comments all the time and while I have addressed some of  them in the past it seems like this is a good time to readdress them. These are my opinions of course. They are based on my own teaching experience as a high school computer science teacher. And your mileage may vary but these things I believe.

C# is a proprietary MS clone of the Java language

Two things in here. One is that C# is proprietary and the other is that it is a clone of Java. Neither of these is completely correct. The C# language borrows heavily from a number of languages including Java, C, C++, Visual Basic and Haskell just to name a few. In more recent years Java has borrowed heavily from C# as well. So while no language develops in a vacuum it is not far to call C# a “Java clone” even though they have many similarities. As for proprietary, C# is a standard language and C# compilers can be (and are being) created without any control or limitation from Microsoft or other vendor. The same can not be said for Java which, while it has a community model in theory, is largely controlled by Oracle who purchased Sun Microsystems. If there is a proprietary language in this mix Java fits the bill closer in my non-legal mind.

OF course I don’t understand why being “proprietary” rules out using something in school anyway. From what I can tell they use copyrighted books, patented products, and all sorts of proprietary products every day in schools. With programs like MSDN AA for schools and DreamSpark for students getting software very inexpensively or even free for students is not an issue with C# either. There is also C# Express Edition which is a free and easy download.

If students use Visual Studio, they'll spend all of their time placing buttons and not learning to program

I’ve wrote about this before but it bares repeating. This is a teaching problem not a tool problem. On one hand you can, if you really want to, limit your students to command line programming. It’s just as easy and just as boring as programming in C, C++ or Java. So if boring is your goal please stay away from Visual Studio. On the other hand if you want students to enjoy the confidence and encouragement they might get from creating real graphical user interface programs that look “real” then maybe Visual Studio is for you. There are ways to keep students focused on the code that you want them to focus on as well. You can supply form templates for example. You can specify exactly what a user interface will look like as another option. OF course if you really want to have students spend more time on the user interface than on useful programs there are far better languages than C# (or Visual Basic) for that. Some languages have these really horrible APIs that you have to hand code every little piece and attribute of objects on a screen. Yuck!

C/C++ give students a better foundation to learn other languages

Assembly language is even better for this! But like C or C++ it is a hard way to start. If you are Bill Gates than by all means start with Assembly or even C/C++ but if you are anyone else you may want to think of something a little more easily approached for a first course. There will be time for C/C++ or even Assembly language down the road. I do believe though that this is also a teaching issue, a pedagogy issue, rather than a tool issue. It is a lot about how you teach the concepts that makes the knowledge transferable to new programming languages. And if the complexity of the syntax scares students off or just gets in the way of them progressing than you lose all of the theoretical value of the tool.



  • For one it would force people to get Microsoft devices. Think about this scenario: Why not Objective-c in Cocoa with Xcode.

    I think it hurts institutions by siding with one company. And forcing students to buy Mac's, windows or use linux is just

    plain wrong.

  • >For one it would force people to get Microsoft devices.

    Actually no, it wouldn't. The Mono Project C# implementation and toolset -- mono-project.com/Main_Page -- spans all the major desktop OS families.

    Personally, selecting from the major cross-platform languages in use today, I'd opt for ECMAScript as the more obvious candidate than either of the server-oriented standards.

  • Using C# is no different than choosing any other language.  The teacher has to commit to learning and resourcing some language and for a PC based school C# is as good as any.  My language choice usually depends on the availability of good education resources.  I also like look at the future of a language; who is using it for what.  Since I am not a high speed CS degreed programming teacher with years of experience programming in some language at a semi-professional level I need something that is easy to learn, easy to install in a lab, has low overhead, a good IDE and has lots of high school level educational resources.  I presently use VB and C#.  VB is the primary language I teach simply because I have done it longer but I like C# for the games/Xbox/XNA connection.  Java and its IDEs are a royal pain in the rear compared to Visual Studio.  I have heard arguments that VS does too much for the kids; intellisense, drag and drop, GUI, etc.  That is kind of like saying modern cars do too much for the driver; I like not having to adjust my spark advance or play with the choke to keep the engine running on a cold morning.  I see teaching command line programming sort of like teaching drivers education in a Model T.  Can it be done?  Sure, but it is just a bit out of date.

    Mac User does make an excellent point; students should see other environments on other platforms if possible.  I have my advanced kids using Corona to write Droid phone games.  It is fun; they have to do a lot of learning to figure out how to get a feature to work so for advanced kids it is great.  I would definitely not use Corona for an intro to programming course, the teaching documentation is non-existent and the available IDEs are not as idiot proof as VS.

    There are a lot of Java teachers out there thanks to APCS and university CS programs.  I think that is the only reason Java has such a large following.  You teach what you know, no matter how old it is.

    With the evolution of computer design and usage from towers and laptops (present) to smart phones, pads, Android devices, and so on (future) I really think programming teachers have to look at those devices as the future of programming education.  We only have to look at the number of kids in programming classes to realize we are doing something majorly wrong.  Programming should be fun (after all it is an elective) and writing a game app for your own phone is cool.  The C# and the Win7 Phone connection is an obvious route to getting kids in the programming classroom.  When you consider how much is free it is a no-brainer.

  • Whatever works... If it keeps their attention 15 seconds longer than go with it. The closed mindedness surrounding the less "open" (re: Microsoft) technologies is ridiculous. Most of the jobs in the real world use the same tools. I say not only make them code with C#, .NET, Visual Studio, but have them write apps that they'll love.. twitterbot? asp.net mash up (pandora-like..)

  • Excelente artículo, gracias.

  • C# is just the biggest fork of java... :) android is the second fork thats all.

  • Most likely your students will learn C# on a MS OS equipped computer.  You are locking them right into the world of MS. My first computer was MS based, when I replaced it with Linux, my knowledge of computers and programming went through the roof.  The open source world is just better for learning and exploring.  The fate of Mono is up in the air at this point.

  • @Steve: The new owner of Novell, Attachmate, just fired the Mono team. (See www.zdnet.com/.../8821) Looks like Mono is dead; so yes, using C# will pretty much be for Microsoft platforms only.

  • >  If you are Bill Gates than by all means start with Assembly or even C/C++ but if you are anyone else

    I don't like the idea that Bill Gates is the only one who can understand assembler. Author check your words!

  • Well, San that is an interesting interpretation of what I said. Personally I don't get close to the same interpretation but that's just me. :-) I just meant that it takes a special person to start with Assembly language. Most people are better off starting with a higher level language. Once you have started than I think most programmers can and should understand and use Assembly.

  • Instead of why not use C#, you should ask why use it?

Page 1 of 1 (11 items)