Coding Forward

Every programmer is aware of the language war that has been brewing of-late; unless he/she has been living in a swamp far away from civilization. Java's overwhelming dominance over other programming languages is under serious threat; and even the most vocal Java advocates understand it though reluctant to admit in public.

First salvo was fired by Microsoft with the introduction of C# , .NET SDK and by allowing scripting languages as first-class citizens under .NET runtime, a privilige long denied to them under JVM thanks to SUN's limiting NBH (Not built here) vision. C# not only emulated Java's most successful features, but also came up with several handy features like Autoboxing/Unboxing, Explicit interface implementation, properties, variable arguments, friendly-for-loop and so on. SUN, which had been reluctant to add these much demanded features (by programmers), was finally forced to add these features with Java 5. The hurried introduction of 'genericity' before it's C# advent is a sign that Sun takes the threat seriously.

On the other hand, dynamic languages have grown in popularity, thanks to the success of PHP and newer OO languages like Ruby and Python. Though more focussed on Web development, the collective mindshare developed is significant, and considering most apps developed these days are indeed web apps, they indeed pose a serious threat to Java's dominance over server-based programming.

On the one hand SUN's marketing machinery gets busy dissing dynamic languages to be slow, lacking type safety and unsuitable for developing large systems. On the other SUN developers are busy adding native support for 'Scripting languages' with Java 6. Main focus will be to support 'Ruby' (despite reluctance to admit it) and PNUTS, a homegrown scripting language. If SUN's so convinced that scripting languages pose no serious threat, why's give a high priority to support them? And develop yet another scripting language ? (which incidently was developed by Sun's Japan division, coming from the home country of Ruby!) 

Countless flame wars have been, are and will be fought over internet about which language is the best, and likely to emerge the winner. Most of these discussions are political in nature and have nothing to do with the real merits/de-merits of the languages when it comes to the "in the trenches" programming. As a language-agnostic programmer, I believe every language has it's share of strengths and weakness. There is nothing you can do in one, that you cannot do in other. Some might need you to write lesser code, others more code. Some will run faster and others adequately fast.

Having said thus, I'm not ignorant to the fact that programming landscape is changing. Project budgets are shrinking, thanks to bad economy, along with project timelines due to cut-throat competition. Only those projects that get it right fast and able to change fast keeping with changing business dynamics will succeed in the unforgiving economy.

The reign of Moore's law over processing power ( CPUs getting more powerful and faster every year), has ensured the death of 'my complicated language is really fast' argument. It suffices if the language is sufficiently fast enough to meet business needs. Businesses will, continuingly, be less willing to invest in years of development (with associated huge costs) for the sole reason that the system will run a little faster. Especially, if there are other solutions available round the corner. When time to develop and market is critical to success, companies will look for good solutions that deliver faster, instead of execellent solutions that take longer to develop.

Days of throwaway and dummy prototypes is gone. Prototypes are expected to be built fast and easily convertible to the final solution. Dynamic languages have an edge over Static languages due to their flexibility, ease of development and ability to do more with less code. With the dropping hardware costs and increasing processing power, availability of native libraries to perform variety of tasks appear to be the final barrier. Of course dynamic languages also need faster VMs, for those occasions where the speed of execution makes or breaks the system.

In one of the discussions, Guido van Rossum (author of Python), when asked what would be his number 1 wish for his language, made a frank admission that it would be 'a Faster native VM'. All said and done, Java gained mainstream acceptance only after the success of JIT compilers and Hotspot VMs. In theory, there is nothing to stop development of Faster VMs for dynamic languages. In practice, however, few can afford legions of full-time dedicated programmers like Sun or Microsoft.

Sun and Microsoft opening their VMs may be a good news in the short term, in terms of faster VMs, availability of libraries and tools and wider acceptance. But in the longer run, it can turn out to be a curse too! Ready availability of Java/.Net libraries will kill motivation to develop native libraries. This could seriously hamper the growth of dynamic languages, limiting their usage to faster prototyping. Without a wide repertoire of libraries they will never be candidates for providing full blown solutions. Programmers would still be forced to interact with Java or C# for most functionality.

Other than opening JVM, it wouldn't surprising if a future Java version comes with scripting-like extensions very soon. Microsoft has already taken a lead in this direction with C# 2.0 (closures, partial classes etc.). I'm sure that Java will follow suit. It's very important for the native statically compiled language to be scripting-like, so that, if needed , crtical code in the scripting language can be converted, speedily, into the compiled language for performance. Being script-like will provide an easy migration path (feature to feature). And the addition of these features will also increase programmer productivity manifold in Java and C#.

 As I see it [as of now] Coding foward, most new functionality will be prototyped using lanaguages like Ruby or Python under JVM or .Net environments. Java and C# will be used for the libraries they provide. If the scripting code runs fast enough it will be retained. Otherwise the code will be converted to Java or C# for better performance, and some even to venerable old system-powerhorse C lanaguage too.

Cue : It will pay to know and be ready to program in multiple languages. Proficiency in at least one static, one dynamic and C language ( and remaining knowledgeable about others) will be the key to success.

Leave a Comment