I can
imagine this cry continually being shouted out in back bedrooms, cube
farms and open-plan agile pigpens alike. Every couple of years or so,
a new feature is mooted that will enhance the Java language,
ostensibly to make it more “modern” and keep it competitive with
the likes of C#, Ruby, and even (who woulda thought?) JavaScript.
As soon as the proposed new feature appears on the horizon, excitement bubbles up. Arguments break out on community hubs such as JavaLobby and TSS, where developers swear blind that they can’t possibly be an effective Java programmer without the new feature – in whatever form it ends up taking. (Okay that’s a slight exaggeration, but reading some of the threads, it does feel that way!)
The grass is always greener, and when one of these developers spots SomeOtherLanguage with Feature X, their sperm count can be heard dropping through the floor. Just Google for Java is dead if you’re willing to lose a chunk of your life wading through the Chicken Little doomsayers painting their imagined projections for all to see.
This isn’t to put the new language features down. Generics proved to be a fine update to Java; and annotations (despite initial worries over their applicability and potential for misuse) has proved useful. I often find myself using annotations to provide metadata, e.g. to bind bean properties with Oracle columns; note I don’t use them for runtime config such as deployment descriptors, though – that would be a definite misuse.
Next up we have closures. I’m sure they will provide a very nice addition to the language, but judging by some of the discussions going on, you would think that developers have suddenly lost their mojo until closures become part of the language; sitting around listlessly, waiting, waiting, until they’re empowered to start developing again.
And after closures, I’m sure the Java language will periodically stop working until we get Pikmins, “native” aspects, property reference syntax, everything that Groovy has, everything that Ruby has including dynamics, syntax-level XML support, syntactically sweetened catch clauses, functions as first-class objects, dynamic arrays, switch statements for Strings, immutable Collection classes, deterministic destructors, a using statement just like C#'s,and so on forever.
When Java first appeared and gained popularity, it elevated legions of programmers from the “knives and daggers” of C and C++. We saw genuine productivity improvements. We haven’t suddenly lost this ability to develop efficiently.
So:
New
language features to improve our lives and keep Java competitive:
Good.
Whining
about how difficult the language suddenly is to use until the new
feature frees us from our shackles, or using the feature's absence to proclaim Java's imminent death: Bad to the point of being sad.







Comments