JavaOne: Slides for "Tips and Tricks" available
By darcy on Dec 02, 2008
With the call for papers for JavaOne 2009 out, I thought it was high time to belatedly publish the slides for my JavaOne 2008 bof Tips and Tricks for Using Language Features in API Design and Implementation.
The session feedback from attendees of my talk was consistent on there being too much material gone over too rapidly. So if I revisit presenting this material in the future, I plan to split the talk in two, one part on kinds of compatibility and another more focused on using language features in API design.
To provide some context for the slides, here are some excerpts of the talk.
Leading up to JavaOne, I had been thinking a lot about compatibility, both in general terms as well as understanding the compatibility properties of previous API work and possible future changes. Besides being a central constraint on API evolution and general evolution of the JDK, compatibility also turned out to be surprisingly complicated. At some point, I'd like to writeup further thoughts on the acceptable compatibility region in the three-dimensional space of source, binary, and behavioral compatibility.
I feel there is considerable unrealized potential to have more commonly used program analysis and checking based on annotation processing, now built into Java SE 6 compilers. For example, I think it would be an interesting programming exercise to write an annotation processor to review the source and binary compatibility impacts of an API change. A much simpler example discussed in the bof is an annotation processor to find methods and constructors that are candidates for conversion to var-args.
A few times in my API work, I've seen that apparently conflicting goals can be met simultaneously by combining different language features, such as JSR 269 annotation processors being able to both use annotations to specify return values while still having a well-typed interface. So for those facing similar challenges, persevere! The solution may be just around the corner.
The last significant section of the talk is a brief defense of Java generics, a topic worthy of future elaboration. While very complicated in the worst cases, many common use cases are straightforward.
Although I find these technical subjects interesting, I expect to be submitting talk proposals on other matters for JavaOne 2009.