chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] utc-time->seconds and local-time->seconds rationale?


From: Jörg F. Wittenberger
Subject: Re: [Chicken-users] utc-time->seconds and local-time->seconds rationale?
Date: Wed, 07 May 2014 12:01:06 +0200
User-agent: Mozilla/5.0 (X11; Linux armv7l; rv:24.0) Gecko/20100101 Icedove/24.4.0

Hi Peter,

I agree with your assessment. It suggested an idea to me, which may or may not be that good:

Use the type system to deprecate those parts know to be broken.

Maybe it would even be a good idea to extend the type system for that purpose. By now all you can do is

(: <broken-thing> deprecated)

right? I'd actually love to still be able to keep the type checking working nevertheless. Maybe like so

(: <boken-thing> <correct-type-declaration> deprecated)

which should give the deprecation warning and still check the type. (I'm not yet completely sure that the suggested syntax can not be mistaken for something else.)

However for the case at hand I'd even love a notation which allows to attach a custom message to the deprecated "type". Possibly like this:

(: <boken-thing> <correct-type-declaration> (deprecated "result is wild guesswork, not calculated"))


I hope this illustrates the idea...

Best

/Jörg

Am 07.05.2014 09:31, schrieb Peter Bex:
On Tue, May 06, 2014 at 11:54:35PM +0200, Michele La Monaca wrote:
On a side note, I've noticed these discrepancies on solaris, cygwin and mingw:

(use posix)
(print (time->string (seconds->local-time) "%z")
        " -> "
        (vector-ref (seconds->local-time) 9))

+0200 -> -7200   (osx,     chicken 4.8.0)
+0200 -> -7200   (linux,   chicken 4.8.0.3)
+0200 -> -3600   (solaris, chicken 4.8.0.3)
+0200 -> -3600   (cygwin,  chicken 4.8.0.3)
+0200 -> -3600   (mingw,   chicken 4.8.0.4)
In my opinion, large parts of the POSIX unit should die.  They're broken,
at the wrong level of abstraction and just generally unschemely.  The
reason these time things are breaking is because the libc time access
is so varying across operating systems.

But even though they're so broken, people use it and rely on it, so
we can't simply put it out of its misery.

Cheers,
Peter




reply via email to

[Prev in Thread] Current Thread [Next in Thread]