The Guardian does a decent job of describing the transition to dynamic programming languages for many projects, but falls short in a few areas:
The recent trend is towards dynamically typed languages, which use inference to reduce the amount of code to be written. Java, C# and C++ are "static typed" languages, whereas JavaScript, Ruby, Python and PHP (used by Facebook) use "dynamic typing". In static languages, the programmer must declare each variable's class (such as string, integer, or list) before the program runs; in dynamic typing, it is assessed as the program runs. Fowler says Ruby is between two and five times more productive than Java. "In static languages, there are all these speed bumps. You can just express yourself more rapidly in languages like Ruby and Python, and that gives you an edge. That edge does make a significant productivity difference."
I don't think it's accurate to make such a big deal out of the dynamic typing issue, especially since most .NET languages and Java are loosely-typed. Most of the tricks that are done with Python, Ruby and other dynamic languages could be done with proper use of object hierarchies in either Java or a static-typed .NET language. The real gain in productivity comes from the libraries and deployment environments. It takes only a few minutes--once--to set up a deployment environment for these languages, and the turn around time from writing code to testing is minimal because so little needs to be done to run the code.
Java's slow decline is coming mainly from the culture behind it. When coming up with the specs for web application development with Java, Sun and its partners had a chance to make an alternative spec that would allow Java to be integrated into a regular web server and Java apps run like CGI or PHP scripts, but they didn't, and that's costing them today. There is nothing particularly special about the syntax or the libraries of the major dynamic languages, PHP aside, that make them naturally better than Java. Rather, it's the way that the Java environment works on the server-side.
Despite growing interest in emerging languages, the dominance of Java and C# is unlikely to be shaken soon. One reason is that many of the alternatives compile to a format that executes on the Java or .NET runtimes, such as Groovy and JRuby, which are dynamic languages for Java, and Iron Ruby, Iron Python and F#, which run on .NET. This enables easy integration and access to rich runtime libraries. "People are not learning new languages to escape from platforms, rather they are trying to find new ways of doing things better on the existing platforms," says Bini.
This approach is a half-way approach, and won't address the underlying issue of the complexity of developing an application in Java that is ready for deployment. In the long run, it'll be a trojan horse that enables a purer set of dynamic languages to gain a better footing. Developers will start migrating to JRuby or IronPython, and eventually new projects will start to be evaluated from a perspective of "do we really need the JRE or CLR?" In many cases, they won't, and thus Java and .NET will be bypassed. Where businesses will benefit is that developers can pick and choose. Pure Ruby or JRuby? Use JRuby going forward on legacy Java systems, write new business software that has little practical need for the JRE's huge object library in pure Ruby with ruby-on-rails and other frameworks.
I won't hold my breath that businesses and government agencies will ever get over the "one language to rule them all" mentality. There is a lot of security in having a single language that kinda works because there are more developers to choose from, and there is less risk of "why did you choose this over that" at project reviews. It's competing against the mentality embodied by the saying "nobody ever got fired for buying IBM (or Microsoft)," and that's a battle that no one was won yet.
(For what it's worth, I welcome the decline of Java. Ironic, coming from a Java developer. Not only is it more job security later on when most people have forgotten Java, but I'm looking forward to possibly switching to Ruby and rails within the next year at my day job.)
Leave a comment