←back to thread

setBigTimeout

(evanhahn.com)
210 points cfj | 1 comments | | HN request time: 0.001s | source
Show context
miiiiiike ◴[] No.41880787[source]
Got hit with this one a few months ago.
replies(2): >>41880846 #>>41880864 #
BillyTheKing ◴[] No.41880864[source]
this is the thing with JS and TS - the types and stuff, it's all good until you realise that all integers are basically int 52 (represented as float 64, with 52 bits for the fraction).

Yes, it's nice and flexible - but also introduces some dangerous subtle bugs.

replies(2): >>41881020 #>>41881048 #
1. vhcr ◴[] No.41881048[source]
Not ALL integers are 52 bit, BigInts were added on ECMAScript 2020.