Translate

середа, 16 жовтня 2013 р.

If Java Is Dying, It Sure Looks Awfully Healthy



A recurring prejudice in the forums where the cool kids hang out (Hacker News, Reddit, etc.) is against Java, the language. The oft-repeated sentiments are that Java is verbose and fading in popularity. While I accept the first descriptor, I can find little evidence to support the latter.
Java certainly can be verbose. Until a year and a half ago, when Java 7 came out, a simple task such as writing to a file required a lengthy multi-step process, laden with "ceremony." In response to this pervasive wordiness, there sprang up several scripting languages, which were purpose-designed to spare developers from long syntactical passages to communicate a simple action: NetRexx, Groovy, Scala, and others. I'm a fan of Groovy and use it in my own projects, but mostly for the additional capabilities it provides (optional typing, closures, method injection, metaprogramming, and so on) rather than its concision.
Even with the advent of Java 7, some developers legitimately point to long class and method names, such as MethodExpressionValueChangeListener as being tiresome to type and difficult to remember. However, I think it's well-nigh impossible to develop a language and libraries that make up the primary platform for enterprise computing without have occasionally long, descriptive names such as this. Personally, I prefer long and descriptive to short and opaque, such as strstr() in the C standard library. Concision is not always a blessing. Wordiness notwithstanding, Java could certainly reduce the amount of ceremony it needs for many tasks.
But when it comes to Java being in some kind of long-term decline, I see little supporting evidence. The recent JavaOne show, that annual jamboree of Java coders, was clearly larger and better attended than it has been in either of the last two years. Vendors on the exhibiting floor with whom I spoke were unanimous (truly not a single exception) in saying that traffic, leads, and inquiries were up significantly over last year, which itself was better than the year before. Normally, when technologies start their ultimate decline, tradeshows are the first to reflect the disintegrating community: Vendors don't want to pay to be at a show with shrinking attendance and developers who are not required to attend start spending their travel budget on other more relevant events. Invariably, there comes a time when a tradeshow/conference feels like a tomb — the sure sign that the final death spiral is imminent.
Technically, the language continues to advance. As I mentioned, Java 7 was an important release both at the language and JVM levels, and Java 8, which is expected in March, looks equally promising. Features for Java 9 have already been announced and are targeted for 2016. Unlike Sun at the end of its custodianship of Java, Oracle has stuck to its goal of issuing a new major release of Java every 24–30 months. Java 8 will add closures (that is, lambda expressions). Closures reduce code, diminish the need for anonymous inner classes, and facilitate functional-like coding. Greater modularity (which will be complete in Java 9) will help efficient management of artifacts, as will several enhancements that simplify syntax in that release.
JavaFX continues to advance and is significantly easier to program for than Swing. This attention to the UX is an opportunity for growth that might well develop more than presently expected. Oracle is acutely aware of Java's role on small devices. (According to the company, some 3-billion handheld devices run Java today.) It has integrated the former JavaME with the Java SE edition and it is actively developing Java for the upcoming wave of small implementations known as the Internet of Things (IoT). As Eric Bruno's blog post on the IoTexplains, an entire project to monitor attendance of classes at JavaOne, from the cameras to the back-end real-time analytics,was written in Java. Not many platforms and languages offer a range so wide they can run on small devices and support massive enterprise systems.
When you add in the Android ecosystem, whose native development language is Java, it becomes very difficult to see how a language so widely used in so many areas — server, Web, desktop, mobile devices — is in some kind of decline.
The good health of the ecosystem is even more evident if we look at the JVM. This, too, has continued to advance with each major release of the language. The addition of the new bytecodes, including invokedynamic, in Java 7 demonstrated how well the JVM works. When the JVM implementation of Ruby, JRuby, added native support for this instruction, its performance zoomed past the C-based Ruby VM, which for years has been the Ruby reference platform. As JRuby's performance continues to pull ahead, I fully expect it to become the reference implementation. Certainly, it will become the vehicle by which most organization first try out Ruby.
I attended the recent SpringOne 2GX conference by the No Fluff Just Stuff folks, and it was evident how active (even if quiet) the Groovy community is. VMware/Pivotal continues to rely on Groovy and Grails and both the language and framework benefit from constant investment. I'll avoid going through the other major JVM languages, but simply point out that the most popular Lisp implementation today is Clojure, which runs on the JVM — and was unknown three years ago.
On GitHub, which is the mecca for hip projects these days, Java was in the #3 slot both last year and this year as the language of choice for projects. (Its position there below JavaScript and Ruby is somewhat historical: gitHub was originally a primarily Ruby repository.) On the controversial Tiobe index, Java retains its overall #2 place, behind C. (C and Java have gone back and forth for the top two spots since 2002). And on Ohloh, the biggest portal to stats on the open-source community, Java retains the same percentage of total commits that it has enjoyed for the last seven years.
So, what I'm seeing is a language that is under constant refinement and development, with a large and very active community, which enjoys a platform that is widely used for new languages. None of this looks to me like a language in decline.
— Andrew Binstock
Editor in Chief
alb@drdobbs.com
Twitter: platypusguy




Немає коментарів:

Дописати коментар