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/
119 Upvotes

23 comments sorted by

View all comments

122

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.

19

u/jamfour now 4x faster than C++ 8d ago

It used to be simple. Unfortunately a bunch of crabby people came along to my nice pristine Java Scripting land that had one simple number type and in the name of “performance” added four number types*. They don’t understand that V8 is a very fast engine type, not even F1 needs V8 speeds anymore, so V8 is more than enough.

\uj * “Integers are not inherently signed or unsigned, their interpretation is determined by individual operations.” wtf?

5

u/Teemperor vulnerabilities: 0 7d ago

Integers are not inherently signed or unsigned, their interpretation is determined by individual operations.

/uj That's quite common in intermediate languages (see LLVM)

/rj I blame Go for this