[0] https://en.wikipedia.org/wiki/A_Deepness_in_the_Sky#Interste...
https://www.cs.cmu.edu/Groups/AI/html/hyperspec/HyperSpec/Bo...
When you look up "integer": https://www.cs.cmu.edu/Groups/AI/html/hyperspec/HyperSpec/Bo...
"An integer is a mathematical integer. There is no limit on the magnitude of an integer."
What happens when an integer overflows from a fixnum (single-word representation) is that it gets upgraded to a bignum behind the scenes.
IMO Common Lisp is the only programming languages that handles time correctly out of the box, and aside from Scheme (http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z...), is the only programming language with proper support for numbers.
Its datetime implementation, however, is implemented partially in C, and does not support arbitrary timestamps.
The AI's will be scrambling to fix the problem.
[1] store.steampowered.com/app/272270/
https://www.wolframalpha.com/input/?i=years+in+(2%5E64)%2F2+...
You have: (2^64 / 2) seconds
You want: years
(2^64 / 2) seconds = 292277265670.798 yearsTHE END IS NIGH1111!!!!!
The linux kernel (and many other applications) solve this with a tuple of 64-bit ints (seconds, nanoseconds) where 0 <= nanoseconds <= 999999999. Compare this to simply 64 bits of nanoseconds, which would run out in roughly 2554 CE.
Other systems still (perhaps most commonly) are using double floats for seconds. Under that scheme, nanoseconds were only representable until Feb 17th 1970. The last representable microsecond will be some time in 2106, and the last representable second won't be for another 150 million years or so.
Personally, I'm happy with the precision afforded by floats. Timing uncertainly (outside niche applications) is generally much larger than a single nanosecond, and even microseconds are a bit suspect.
Let's not even get into timeval which uses the same size field for microseconds.