My editorial last week, "If Java is Dying, It Sure Looks Awfully Healthy" hit a nerve in various developer communities. Between Reddit, Hacker News, and Slashdot, it received more than 1,000 comments. Curiously, very few commenters disputed my central argument; namely, that the common prejudice that Java is dying is not supported by the reality. Here, however, are the major points they did make:
Java is not dying, but it is becoming a legacy language. This was perhaps the most common theme. Legacy languages, in my experience, are characterized by two traits. First, their codebase increases only to the extent that is required by maintenance of existing code. That is, new projects in which any language can be employed rarely opt for the legacy language. The second feature is that some other language or languages are widely used for the type of software previously written in the legacy language. In this sense, COBOL fits the definition of legacy: Business apps today tend not to be written in COBOL, but in a myriad of other languages, notably, um, Java.
Java only appears to be dying because the cool kids prefer other languages. I agree this is true. Software development is living through a "golden age" of new language development. In the last 15 years, D, Erlang, Lua, Ruby, Scala, Groovy, Clojure, among others have all emerged (although some were created long before this period of growing popularity), while a whole crop of new languages are competing for attention: Go, Rust, CoffeeScript, R, and Haskell, to name a few. Never in the history of computing has there been such a wealth of language options with such a wide variety of features. Given that many university computer-science programs use Java as a teaching language, there is the perception that Java represents the status quo, while the new languages are the emerging items of true interest. I share this view. I like exploring new languages, but their presence says little about Java. As one Redditor observed, "I'm fairly new to the scene, having just gotten my degree this year, but Java and C#/.NET certainly are not 'dying.' I'm on my second job now, and have written Java for both."
Java on the desktop is dead. Here, too, I tend to agree. Java applets are almost entirely gone except in a few niches where they provide a special benefit. And even though JavaFX is a big upgrade from Swing, I don't think it will be enough for Java to reclaim a major role in client interfaces, especially not on the desktop. However, Java hasn't been a factor on the desktop for a long time, so its future absence from the space is not really an indication of its overall health.
And finally…several commenters agreed wholly with the editorial and thought it did not go far enough. They pointed specifically to the very high quality of tools in the Java ecosystem, especially IDEs; the vast array of libraries many of which are available as open source; the remarkable portability of Java bytecode; and the wealth of documentation and resources available to developers. One might argue these are the benefits of long-time languages, but I can think of no other language older or younger that has all these features in such profusion.