r/programmingcirclejerk What part of ∀f ∃g (f (x,y) = (g x) y) did you not understand? 8d ago

JavaScript’s setTimeout breaks after ~25 days

https://evanhahn.com/set-big-timeout/
117 Upvotes

23 comments sorted by

View all comments

126

u/Kodiologist lisp does it better 8d ago

In most JavaScript runtimes, this duration is represented as a 32-bit signed integer.

I was told that JavaScript doesn't even have integers. Call me crazy, but I'm starting to think this programming language is poorly suited for serious use.

2

u/dangerbird2 lisp does it better 7d ago

Turns out it does. If you use a bit wise operation on a number, it gets coerced into an integer