Over the last few months, I’ve seen a steady attention rise in scripting languages Python and Ruby, as well as in functional programming languages such as Haskell and Erlang. There are others but these in my eyes have the majority of attention at the moment besides of course the Microsoft languages C# etc. Scala, for the Java world, a multi-paradigm programming language is also gaining some attention.
Lets have a look at some of the characteristics of these languages.
Python was hailed by the TIOBE Programming Community Index as the programming language of 2007 based on its rise. Having spent some time with it, I’m not surprised. The language is compact and favors comprehension as well as certainty in solving a problem through providing less syntactic sugar to achieve an outcome. Jython, Python written in Java, can be used to integrate easily with existing java classes.
Ruby, is probably most famous as the language used in Ruby on Rails(RoR) and is very popular with Startups and the Graphic Design community. Ruby provides great flexibility in its syntactic sugar to achieve programming outcomes, which I have always found interesting when RoR’s philosophy has been Convention over Configuration. The gaining of simplicity here gives flexibility elsewhere. In the Java world there are so many frameworks now, which one to use is always an interesting question.
These scripting languages have enabled some great applications to be developed, as they are dynamic they are a lot slower then other languages. At this time they do not effectively utilise multi-core CPUs. Now this is where the Functional Languages have gained some steam recently, as people start to realise that we are more likely to see more cores in future CPUs as opposed to increased CPU power of each core. Even though some of these languages are quite old, we are seeing the rise of the likes of Haskell and Erlang.
Haskell is one of these languages that has grown from Academia as a product of more than twenty years of research. It is a purely functional programing language, that is it excludes destructive updates and identifiers are immutable eg let x = 1 (can not be changed). It is different from the imperative Java programming style that most are used to and does require a good grasp of the type system to become productive. Yet it is gaining tracking in a number of quarters. This surprising blog entry, I found today, regarding a System Administrator using it in favor of Python and Perl for scripting.
The side effect of using functional languages, is that they are inherently capable of being parallelized, whola potential support for multi cores.
The functional language Erlang, got my attention, when Amazon announced Amazon SimpleDB which had followed shortly after the buzz surrounding CouchDB. Erlang is again a functional language that is focused on concurrent programming. It was originally designed at Ericsson to support distributed, fault-tolerant, soft-real-time and non-stop applicatons (lots of words for high availability). I experimented with the language myself, doing the Erlang tutorials, and liked what I saw. Getting used to tail recursive programming is interesting.
I suspect what we are seeing, is these languages being used to break previous paradigms of best practices as the nature of hardware evolves. They are great tools to have in one’s arsenal to deliver innovative solutions. As these languages gain more attention span from enterprise developers, they will question why some of these capabilities do not exist with the current Java language. Indeed there appears to be a language feature race on with Microsoft based language, such as C# at the moment.
Has Java lost some of its MoJo in the Enterprise? Maybe a little, but there are so many good Java libraries and applications around that aid productivity and have been proven, that I feel the effort will be put in to continue to evolve the language. Often these libraries do not exist, at this time for the other languages.
I hope though, that as the Java language evolves, this will not be as a means to compete against C# but more so because it makes logical sense to do so! Scala, Jython are a few examples of languages that work well with Java.