A recurring question in computer science education at all levels is what language should be taught first. The discussions on this issue at Slashdot, where the issue comes up about once a year as far as I can tell, are legendary. There are various arguments that are used:
- It should be a language used in industry so students can get jobs
- It should not be a language used in industry – we’re not a trade school
- It should be a language that was developed specifically developed for teaching
- It should be a very high level language
- It should be a very low level language (assembly language
- It should not be a proprietary language
- It should be available on a lot of platforms
- It should be available from multiple sources
- and on and on and on
It seems to me that the first thing one has to do in order to make a good selection is to remove the irrelevant arguments from the issue. For example, a language being used or not used in the professional job market is not in and of itself relevant. In a first course one is not trying to create a professional programmer (even though some have gotten jobs with little to no formal training) so the fact that a language is used for professional work in not important. Likewise that a language is used by professionals is not per se a reason to discard it. Now there may very well be things that make a language a good choice for professionals that either do not contribute to learning in a first course or even make it to complicated to use. But that the simple fact that professionals use the language does not automatically mean it is not good as a teaching language.
Another completely irrelevant argument is over avoiding proprietary languages. Cost may (though it rarely is) an issue but generally schools can easily afford proprietary languages. Compilers and even IDEs are available for free for proprietary languages like Java and Visual Basic .NET. Often when I hear the argument that proprietary languages should not be used the issue is mostly philosophical and very often another way of saying “Microsoft Bad.” Individuals who reject C# (which is not proprietary as the term is properly used) and promote Java (which is proprietary) by saying that they don’t want to use proprietary languages generally fall into the “Anything but Microsoft” camp and are often confused about what is and is not a proprietary language anyway.
A semi-relevant argument is the one about tools being available from multiple sources. But to be honest I think that is more valid in later courses than in a first course. In a first course keeping it simple is important. I think that this is easier if every student is using the same tools as the ones being used by the instructor in class. Being available from multiple sources is a relevant argument for a lot of things but not for a first course in programming.
The next big thing is to identify what things are relevant. In my opinion what is relevant are the things (features and tools) that help one teach the important concepts of the course. If for example object orientation is important than languages like FORTRAN, COBOL and PASCAL are not good candidates even though there are some versions of those languages that support OOP they are not really designed for it like C#, Java or Visual Basic .NET. If you are trying to teach strictly functional programming than something like Scheme is going to jump out as a natural choice while Java or C is clearly going to get ruled out pretty much automatically. I could go on about this but you probably get the idea.
Things like how simple is the syntax, how easy to use is the debugger, how good are the error messages and related things are also relevant. Although to some the issue of using or not using a debugger is a source of major controversy. I may take that one up in a later post. But if you are going to use and IDE it’s available features are relevant.
So it is a complex question with no simple answers. A lot of times the instructors level of expertise with given languages is also going to be a factor. It’s hard for me to second guess the choices someone else makes unless they are clearly failing at teaching or getting the students to learn. Of course lots of second guessing does go on. There is as much politics in computer science as anything else. It makes life interesting. Yeah, I think interesting is the word I want.
BTW I read an interesting post today that is related to this topic. It was at Lance Fortnow’s blog. The comments are the best part so don’t miss them.