That's right. So eventually it won't be an extra dependency. For that
reason I think it would be much better to make the contrib date/time
functions delegate to the Joda Time library.
--
R. Mark Volkmann
Object Computing, Inc.
It looks to me like this lib as it stands would allow me to go from
a date string (from a file or user input) or from the current date,
through some minimal calculations, and back out to a formatted string
without ever touching the underlying Java object directly. Why do I
care if Joda time is inside or not.
...except of course that every external dependency is an increased
burden on the users of any code I write. It seems likely that a
pretty substantial percentage of use cases could be handled in a way
that would allow either Java lib to be used underneath. That way I
would have no extra dependency now, or if I need Joda features could
use that instead.
--Chouser
I think some reasons to use Joda Time instead of new code for
data/time calculations include:
1) Joda Time is already very well tested, so it's known to be good code.
2) Joda Time has much more functionality than what has been
implemented so far in Clojure. Having the Clojure code delegate to
Joda Time paves the way to easily add more of that functionality
later.
3) When Joda Time becomes a standard part of Java, the extra
dependency will go away.
4) Reimplementing Joda Time functionality consumes time that could be
better spent on other things.
I'm not arguing for new date-time code. I'm arguing for a good clean
functional wrapper around code that already ships with Java. What
Matt has posted strikes me as a good start down that road.
--Chouser
> ...except of course that every external dependency is an increased
> burden on the users of any code I write. It seems likely that a
> pretty substantial percentage of use cases could be handled in a way
> that would allow either Java lib to be used underneath. That way I
> would have no extra dependency now, or if I need Joda features could
> use that instead.
This is exactly how I feel. Relying on code in contrib is no big deal,
but as soon as I read something about downloading an external jar file
and making sure it's on the classpath, I start to rethink whether I
*really* need that functionality in the first place... maybe I could
just wrap something built-in to the JVM. So why not start with that in
the first place?
If Joda gets included in the next JVM, that would be great. If a good
package manager that could automate these kinds of dependencies were
written and achieved wide use within the Clojure community, that would
be even better. But we need to consider the current situation. There's
definitely a need for The Simplest Thing That Could Possibly Work.
-Phil