Thursday, April 17, 2008

I knew him, Horatio

The other day I found myself wondering what would replace Java as a programming language. Many are so entrenched in Java (or the latest cool new tool) that they just ignore the fact that all things come to an end. C seemed so entrenched that it was hard to imagine anything else eclipsing it (no pun intended).

What got me thinking about this was my philosophical frustration with String vs StringBuffer. String is the base class for handling text but to do anything even as banal as concatenation, you are supposed to use StringBuffer. I understand that immutable Strings were introduced for efficiency but they lie like a pustule festering in the heart of the language. Nothing will ever make them elegant.

And now we have Annotations in Java 5 (or is it Java 1.5?) We are told that XML is banished and deployment descriptors are a thing of the past (see here). The trend now is to entangle your code with deployment information (WebService and Entity annotations). Ironically, the instructor in the Core Spring class I recently took tried to sell us on the ways that Aspect Oriented Programming would disentangle our code. He followed this up by indicating all the Spring-specific annotations that we should add to our code! I can't escape the feeling that we are going to be deluged with new annotations when every framework will insist on their own, unique attributes. In order to port our so-called POJO to a newly released framework (or new version of an old one) we are expected to recompile our code. Imagine the stack of Annotations required to make our Plain Old Java Object deployable on the wide variety of possible environments our clients may be using. Alternatively we could try to tell CitiGroup that they have to use the technology that we chose to Annotate. Good luck! This smells like an attempt to solve a short-term problem (That Evil XML) with a long-term solution.

In Java 1.7, there is talk of multiple object return types. This may be the final sign that Java has Jumped the Shark. Are the developers of the language compelled to pile more and more stuff on the specifications to show that the language is growing or something.

And thus begins the gradual decline of Java.

No comments: