[D-runtime] druntime commit, revision 410

Sean Kelly sean at invisibleduck.org
Fri Nov 5 13:11:46 PDT 2010


On Nov 5, 2010, at 1:04 PM, Jonathan M Davis wrote:

> On Friday, November 05, 2010 07:06:59 Sean Kelly wrote:
>> On Nov 4, 2010, at 6:43 PM, Jonathan M Davis wrote:
>>> Looking at core.time, I'd really suggest just moving over
>>> std.datetime.Duration to core.time along with TickDuration, FracSec, and
>>> the dur!() function for creating Durations, possibly along with some of
>>> the helper functions (which I believe are primarily restricted to
>>> template constraints).
>> 
>> Are there still 4 distinct duration types?
> 
> No. Just two. Much as I liked the 4, and I thought that they worked quite well 
> (for the most part, you didn't have to care about the types), pretty much 
> everyone else thought that it was overly complicated. So, I reduced it to two. 
> Now it's TickDuration (which was SHOO's Ticks), which is used when getting the 
> time from the system, and Duration (which essentially was HNSecDuration), which 
> holds the number of hnsecs. It's similar to what you have, but it does have 
> functionality which yours doesn't have to fit in better with std.datetime, and it 
> makes heavier use of templates than yours does. For instance, to create one, 
> you'd use calls like dur!"seconds(5) or dur!"(usecs)(502), and getter functions 
> like seconds are aliases for get - e.g. get!"seconds" - so it's far better 
> suited to generic programming.
> 
> I'll try and have a proposed core.time tonight or tomorrow, though it should be 
> noted that it may need further changes based on how the review of the current 
> datetime code goes, even if it seems entirely acceptable on its own.

I rolled these changes into druntime now because I figure there's plenty of time before the next release to sort out the details, so no rush :-)


More information about the D-runtime mailing list