[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Comments on draft 6
On Tue, Feb 21, 2012 at 12:52 AM, Vitaly Magerya <vmagerya@x> wrote:
> John Cowan <cowan@x> wrote:
>> Vitaly Magerya scripsit:
>>> Page 56, section 6.13.4: what is the rationale of current-second
>>> function, what are it's intended uses?
>> I'm somewhat at a loss here. Most languages provide some variant of
>> this functionality, but I can't find any specific rationales for it.
> Fair enough, and that question was less editorial than the others,
> so let me clarify. Specifying TAI is an unusual decision, and it
> seems to me that either using Unix time or not providing this
> function at all will be better, but I can only claim so if we agree
> on goals of introduction of this function.
As you say, there are generally two uses of monotonic time -
as a timer, and as a timestamp (and basis for conversion to
calendar time). POSIX time is completely unusable for the
former because it jumps a second. It is also broken for the
latter because it is unable to represent the distinction between
the first and second repetition of a leap second. POSIX
time was a mistake that should not be repeated.
TAI time has neither of these problems - it is clearly the
Right Thing. There are two concerns: first conversion to
POSIX time for interoperability with broken systems. I'd
just as soon leave this to WG2 and not stain the core language
with historical cruft that is not part of Scheme's history.
Second, ease of implementation. This is not as hard as
one would think, and a reference implementation which
supports runtime updates to the leap-second table will be
provided. In the worst case, TAI with no runtime updates
is no more broken than POSIX time with no updates.
Scheme-reports mailing list