Fatten or strip - the great Java debate
Sugary syntactical goodies
QCon Fundamental divisions over whether Java should be fattened up or have bits ripped out to suit changing requirements have emerged at an industry show.
A panel of industry experts at Qcon in San Francisco agreed Java should be left to enter its middle years without major changes and the industry should look for a "new language, soon".
As we all know, though, the devil is in the details. In this case, making Java easier to learn and to use was everyone's favorite topic.
While some wanted to add more APIs, others took a "less is more" approach, while others still supported the idea of a modular "core" framework" or a "consumer" friendly edition of Java.
After nods of agreement that Java should be allowed to mature gracefully and not make a fool of itself in mid-life, Spring father and Interface 21 chief executive Rod Johnson lit the touchpaper by calling for "negative growth" in the number of Java APIs in the JDK - especially old or leased used APIs - that he said are "hurting the platform".
Johnson singled out AWT which, a straw poll of QCon audience members revealed, is being used by precisely no one.
"We really need to take some hard decision because the size of the JDK is getting problematic.... It's naive to think there isn't pain at present. To think successive versions of Java get bigger and bigger - people take pot shots at Java, but we are giving them a bigger target," Johnson said.
Google's chief Java architect Joshua Bloch rode in and found surprising common ground with the only Java outsider - Erik Meijer, creator of Microsoft's LINQ, who cautioned the Java community against removing things from a platform or language once they are "out there".
"There are whole packages I'd like to drop," Bloch agreed. "But there are banks and insurance companies that have invested tens of millions of dollars in this, and if you don't support this you will ensure they don't progress forward."
Meijer called for prudence when architecting a language at the very beginning, as you can hurt legacy infrastructures and break interdependencies by removing APIs later on. "We have to be more careful about puling things out. Once it's in, you never take it out," he warned.
On the other hand, Bloch supported adding "good syntactical sugar" that doesn't Increase the "surface area" of Java for students and academics.
For Bloch, that meant saying "no" to Java Specification Requests (JSRs) for things like XML literals but - surprise - "yes" to things like a forthcoming Google-sponsored JSR Bloch said would catch multiple exception types to help simplify programming. That left some in the audience who wanted nothing more than some sweet XML-like syntactical sugar feeling distinctly sour.
Bloch found backing from panelist and Sun JRuby developer Charles Nutter, who said Java should "solve pain points of developers in a measured way, not in a C# way where you throw everything in or Perl 6 language where it's the 'every language'." His colleague, Chet Haase, an architect at Sun's Java Client Group, suggested Java could be made easier and appealing to a larger segment of the population - such as consumers - through changes to the language or libraries.
So just whose to decide what's in and what's out? The community. Ah, the wisdom of crowds.
"We should ask the users [what they want] rather than making assumptions," Johnson said. "[We] shouldn't assume people don't want to make some effort if they see it's worth it in the end."
And that's where Sun's OpenJDK could come in, according to Nutter "There's noting to stop anyone developing their own version of the OpenJDK. As we see more and more of that, it's going to feed back into the [standards] process, and we will know if people want us to pull things out."®