The Language Arms Race
Monday, March 13th, 2006It seems at the moment that there is an arms race on with language specifications. I’m particularly referring to Java and C# but there are languages pushing them (the spec leads) on to include more and more language features. C# is introducing a raft of new features in C# 3.0, this is old news and the fact that Java introduced a set new features in J2SE 5.0 is even older news. I don’t think anyone would disagree that Java is behind on this race and it was really only the emergence of features such as autoboxing and generics in C# that push the guys at Sun to introduce these features in Java.
Now there is even more momentum to introduce even more language features to Java, things such as closures. Now from a selfish point of view I would love closures and many more features in the language when I’m coding. This is because I have been writing code now for almost 10 years and coding Java for about 8 years, plus working with other languages that have these features (Ruby, Python and even Perl) and so more features doesn’t pose much of a learning curve to me. However what it will do is make Java more inaccessible to people new to coding. It will also introduce more ways to do one things which for a commercial power house and main stay language is almost certainly a bad thing.
I have dealt with many code bases produced by inexperience or misguided developers throughout my career and one thing that has saved these code bases from unmitigated disaster is the fact that there is only a few ways for achieving things in Java. It keeps the developer under control, stops them straying too far from the path. Also for those who are experienced developers the simplicity and lack of features is also a good thing. A concept (program) based upon a few simple rules (features) is often more elegant than one based on many complex ones. I think studying mathematics has given me an appreciation of the beauty in keeping things simple and this principle apply just as well to coding and language specifications.
I’m, after intial hesitation, now keen to add scripting support to Java, this will hopefully stem the tide of additions to the Java language features and keep it clean. Obviously the use of these languages will need to be governed correctly to ensure projects don’t turn into the tower of babel but in the end I think the Java platform if not the language will be a richer technology.
Oh and C# can add what they want because I’ll be able to code in JRuby which is nice ![]()