Java News from Friday, February 11, 2005

While reading Brett McLaughlin's article about annotations, I decided that I actually like annontations, and they make quite a bit of sense. I hadn't paid much attention to annotations before because most people seemed to be using them to do weird things with EJB, web services, and other complex technologies that I've always found far too baroque to be of interest. However, annotations apparently have quite a bit of use for plain, everyday Java code too. What i don't understand, though, is why this was designed in such a way as to break source level compatibility with Java 1.4. If the syntax had been hidden inside comments, I could put annotations in my code and still compile it on my Mac. As it is, XOM and other code bases that must run in Java 1.4 and earlier basically can't use this stuff. That's a shame.