RFC: Time Library 0.1

John Meacham john at repetae.net
Wed Jul 6 18:11:30 EDT 2005

On Wed, Jul 06, 2005 at 01:38:12AM -0700, Ashley Yakeley wrote:
> > Also, it would be nice if the LeapSecondTable was not a functional type,
> > but rather something with structure, like a list of (year,offset) pairs.
> > There could be apps that will have to look at which years the leap
> > seconds actually occured in and probing the function with every possible
> > value in its domain is not very fun.
> That's a good question. I used a function because that's the "least" 
> type necessary to do the conversions, at the same time allowing 
> estimates extending infinitely into the future (and past, if we want 
> "proleptic UTC"). A list of pairs would have to be walked through, in 
> effect converted to the function type.

How about making LeapSecondTable an abstract type and having functions
for converting to and from a list based representation? then it could
use whatever efficient representation it wants internally and we still
have the ability to get at or provide the raw data. However, you raise a
good point about implementations that 'estimate' infinitly far into the
future or the past, not sure what to do about those. 

John Meacham - ⑆repetae.net⑆john⑈ 

More information about the Libraries mailing list