[phobos] next release (module useability)

Jonathan M Davis jmdavisprog at gmail.com
Sat Sep 11 11:49:59 PDT 2010


On Saturday 11 September 2010 11:07:57 SHOO wrote:
> (2010/09/11 15:10), Jonathan M Davis wrote:
> > On Friday 10 September 2010 22:40:58 SHOO wrote:
> >> My question is simpler.
> >> 
> >> I want to know the reason.
> >> 
> >> time is a concept including date.
> >> stopwatch/benchmark is a part of time, but it is not a part of date.
> >> date is redundant if so.
> >> Nonetheless what will the reason to add date to a module name be?
> > 
> > Date functionality and time functionality are not necessarily the same in
> > nature. You do different sorts when you're dealing with dates then when
> > you're dealing with time. However, they do overlap a fair bit, so it can
> > get a bit complicated and subjective.
> > 
> > If you had std.date and std.time, then it would make sense for
> > date-specific stuff to go in std.date and time-specific stuff to go in
> > std.time. By having std.datetime, you're indicating that both the
> > date-specific stuff and the time- specific stuff are together. A module
> > named std.time doesn't necessarily have anything to do with date
> > functionality, while std.datetime clearly has both (on the other hand
> > std.date is arguably a bad name all around because while dates are
> > times, times aren't necessarily dates).
> > 
> > Now, dates _are_ time-related even if dates and times and their
> > associated functionality are often dealt with quite differently, so it
> > does make some sense to simply name the module std.time. However, it's
> > not as immediately obvious that the module covers both date and time
> > functionality. So, I think that std.datetime is a better name, but
> > std.time would certainly work.
> 
> I think date is only an expression method of time that elapsed from
> 0001/01/01. And the expression is easy to be understood by human beings.
> 
> std.date must go as soon as a replacement is done. Therefore, I think it
> is not necessary to consider std.date.

I wasn't really considering std.date as it is so much as a potential name in 
general. And given that std.date is more time-centric than date-centric, it 
arguably wasn't the best name to begin with. But it is what it is. Certainly, 
regardless of what we do with the names, the code that is currently in std.date 
will need to be deprecated or outright removed as soon as we have a viable 
replacement.

- Jonathan M Davis


More information about the phobos mailing list