Pure Danger Tech


navigation
home

In defense of JSR 310

02 Nov 2008

I just ran across this ridiculous assessment of JSR 310 and had to comment. I tried to comment on the blog but it was flagged as spam.

My response:

I agree that naming is at the heart of writing good APIs but I have to object to this characterization of JSR 310.

The JSR 310 APIs are the result of a great deal of extensive and open discussion on the 310 mailing list. There have been lengthy discussions on naming of all of the major classes and concepts in the API and Stephen Colebourne (the spec lead and also creator of Joda Time) has been an impressive leader in this regard – asking for feedback, guiding the discussion, and generally driving consensus without dictating a “right” answer.

I’m not affiliated with the JSR, but I’ve followed a bunch of them and the JSR 310 process has been the most open, welcoming, and skillful that I can think of, so I hate to see it spoken of in a negative light.

With respect to the naming instances you mentioned, there is a whole set of concepts that lead logically to the name ZonedDateTime. If you bothered to read any docs, that would make more sense. I recall there being a long debate about other possible names for this class in particular. It was not chosen in haste.

With respect to Clock.system(), Clock is effectively a facade for access to a clock, of which the default instance is based on the system clock. It’s set up this way so that you can implement Clock yourself and control the passage of time for testing (see my blog for more).

If you’d like to get involved and give your feedback, I’d recommend reading the mailing list archives and participating yourself, not casting aspersions in ignorance. I think you’ll find the JSR 310 community to be quite willing and helpful to explain the API decisions.