[Python-Dev] this is why we shouldn't call it a "monotonic clock" (was: PEP 418 is too divisive and confusing and should be postponed)

Cameron Simpson cs at zip.com.au
Fri Apr 6 07:19:45 CEST 2012


On 06Apr2012 14:31, Steven D'Aprano <steve at pearwood.info> wrote:
| Cameron Simpson wrote:
| > | The main reason to use the word "monotonic clock" to refer to the
| > | second concept is that POSIX does so, but since Mac OS X, Solaris,
| > | Windows, and C++ have all avoided following POSIX's mistake, I think
| > | Python should too.
| > 
| > No. If it is not monotonic, DO NOT CALL IT monotonic. Call it steady,
| > perhaps, if it _is_ steady (within some threshold of course).
| 
| Um, steady is a stronger promise than monotonic. This is a monotonic sequence:
| 
| 1, 2, 99, 100, 101, 102, 103, 199, 200, 201, 999
| 
| But it isn't steady, because it jumps forward.

Sure.

| Here is a non-monotonic sequence:
| 
| 1, 2, 3, 4, 5, 6, 7, 2, 3, 4, 5, 6, 7, 8
| 
| This isn't steady either, because it jumps backwards.
| 
| To be steady, it MUST also be monotonic. If you think that it is appropriate 
| to call a non-monotonic clock "steady", then I think you should tell us what 
| you mean by "steady but not monotonic".

I took steady to mean "never jumps more than x", for "x" being "small",
and allowing small negatives. If steady implies monotonic and people
agree that that is so, I'm happy too, and happy that steady is a better
aspiration than merely monotonic.
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

I understand a fury in your words, but not your words.  - William Shakespeare


More information about the Python-Dev mailing list