Do you hate the JDK Date and Calendar classes? Would you like to see an alternative in the JDK? Or are you happy with the JDK classes? Maybe you are happy with pulling in a jar file?
I ask because I get asked from time to time whether Joda-Time is going to get a JSR. Each time this comes up I point out that its a lot of work to do in my free time, and there are infrequent enough releases as is!
So, this blog is an open question - is it worth it? Should JDK7 contain a better datetime library? Please add a comment with your views, postive and negative so I can get some idea of peoples thoughts!
Yes, you should do it, but not as a separate JSR... It should be part of JSR-275 Units Specification. Time is just another measurement, albeit a complex one.
ReplyDeletei heard that was on the table before Tiger, but they did not do it due to the compatibility issues. i actually think it is time ot make a JDK with no deprecated methods, no stupid packges in it.. and i know that it is very hard to do..
ReplyDeleteI would really like to see this in the JDK, although I hope it wouldn't be too much of a time drain. Is there perhaps someone at Sun that could be the JSR spec lead with you as an advisor on the expert, as a workaround for your time constraints (no pun intended)?
ReplyDelete- Chris
The link with JSR-275 could be tricky. They essentially have a completed model, which holds some time related concepts. But a datetime library is in fact something totally different.
ReplyDeleteInterestingly, this could be an argument NOT to go the JSR route, as a nice datetime library could get ruined by being forced to be in line with other innapropriate specs.
Hi Stephen,
ReplyDeleteThe main question should be: what is the advantage of becoming a JSR? Everybody who is interested in Jodatime is able to get her hands on it, so I don't really see the need for the (apparently big) effort.
The advantage of being in the JDK is that there can then be better integration with say MessageFormat or JDBC or lots of other APIs, instead of using wasteful conversion.
ReplyDelete- Chris
I am just waiting for it to be submitted... :-)
ReplyDeleteThe main motivation for a JSR is exactly the integration with the rest of the core API. I don't think it is going to happen soon, though.
ReplyDeleteBesides, a JSR threatens to deface the libarary: look what they've done to Doug Lea's util.concurrent package -- and he was on the spec group!
I'm against including Joda-Time in the JDK simply because that would mean updates take forever. Now what would be helpful is a set of interfaces that allow Joda-Time, JDK, and other libraries to interoperate.
ReplyDeleteOff topic, in reply to Tiago: What bad thing happened to the the concurrent package? It seems to me much better than the EDU.oswego stuff.
My main complaint is: where's the Synch interface? I like to mock stuff and switch implementations around when I'm unit testing. I also miss the simplicity of the WaitableXXX classes.
ReplyDeleteAbout interoperation between libraries: Joda is becoming the de facto standard for time, from where I look. If this really happens, integration will come on its own. This is much better than a comitee.