[phobos] datetime review
Jonathan M Davis
jmdavisProg at gmx.com
Tue Oct 12 10:58:15 PDT 2010
On Tuesday, October 12, 2010 07:21:07 Andrei Alexandrescu wrote:
> Speaking of all this, Jonathan, what's your plan right now? There's been
> some points raised here and there by people, you replied "this is a good
> suggestion but there are cons as well", so I'm not sure whether you plan
> to keep the submission as is or operate changes to it. In the latter
> case, I'm unclear on what changes you have decided to make.
>
> One other thing - it might be useful to take this entire review process
> to digitalmars.D. Is everyone comfortable with that?
I have been making various of the suggested changes, and I hope to have an
updated version with most or all of them by this weekend at the latest, but I'm
not at home at the moment with the updated code, so I can't say for sure what
all the changes are that I've made or am making, though I'll give a list when I
post the new code.
I did decide to make changes to reduce the durations to just Duration (which is
basically HNSecDuration) and TickDuration and have removed most of the addXXX()
functions. I'm not entirely happy with result since dealing with years and
months is definitely more awkward in some cases, but I think that the places
where it's a problem are relatively limited and that it's likely going to be
easier for the average programmer.
I'm currently working on converting TUnit over to use strings as you suggested,
and assuming that nothing particularly wrong with that pops up, I'll be going
with that. Certainly, having to type stuff like TUnit.day seems pretty ugly,
though I did manage to limite the number of places where TUnit needed to be used
directly by the users of datetime.
I think that I'm applying most of your suggestions (and possibly some of the
suggestions of others), but again, I'd have to look at what I've got at home to
remember exactly what changes I've made thus far. I have no problem with taking
the review process to digitalmars.D, particularly since there never seems to be
many people beyond the Phobos devs themselves who post much on the Phobos list.
So, I'll post it there as soon as it's ready.
- Jonathan M Davis
More information about the phobos
mailing list