There were various reactions to Sun’s announcement of moving from SUNW to JAVA. Frankly, I never thought there will be any from the technical world. But there are interesting ones, reflecting more on future of Java. Russell Beatie explains why Java needs an overhaul and Brian McCallister weighs in on why Java gets expensive. The posts talk about the trend towards Erlang, and demand a leaner Java.
This was new for me, because for me it is not Erlang v/s Java, it is Erlang v/s many programming languages. This is simply because Erlang helps you leverage the new capabilities by inherently supporting concurrent programming. The only way it can do this is because it has a radically new approach. It does not use the operating system threads, it uses its own lightweight processes. It was daunting for me in the beginning to follow the syntax, but it was only about moving out of comfortable zone. Any new thing will be uncomfortable in the beginning, and today it is the cost is small when compared to advantages that Erlang can provide.
In my opinion these comparisons are ineffective because they seem to highlight Java’s disadvantages, which have been there since the beginning, and how Java cannot be Erlang. The difference is not because of that, the difference is because of the ability of Erlang to target the new environment and increase ROI for the end user by being a better solution. And it has the potential to not replace only Java but a lot of other languages.
I expect a lot of languages to evolve, including Java. In fact, I believe even the operating systems will evolve to be able to provide the lightweight processes, that today Erlang does on its own.
Instead of comparing Java and Erlang, the Java community should think about how it can approach the new scenario. It can turn out to be better.