Java News from Monday, June 26, 2006

Sun has posted the public review draft of JSR-199 Java Compiler API to the Java Community Process (JCP). According to the draft:

The Java Compiler API is a set of interfaces that describes the functions provided by a Java Language Compiler. This API has three main objectives:

I've only had a chance to skim the API so far, but at first glance it strikes me as overly and probably needlessly complex. Did they really need to invent a completely new file system interface just to manage compilation of a few files? I strongly suspect the working group could cut the number of classes and methods in half without losing anything, and probably cut it by two thirds without losing anything most programmers would miss. This looks like yet another case of the overly generic, overly abstract diseases that infects many of the smartest developers. I suspect someone needs to walk through the hallways at Sun one weekend and surreptitously remove every copy of Design Patterns from programmers' bookshelves. Abstract Factory and Factory Method are solutions to occasional and uncommon tough problems, not the first thing you should pull out of your toolbox for every class. Comments on this are due by July 24.