General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Lawrence D’Oliveiro
ThePrimeagen
comments
Comments by "Lawrence D’Oliveiro" (@lawrencedoliveiro9104) on "Looking Under the Hood of JavaScript" video.
@Vim_Tim But that doesn’t say that large values should overflow.
3
Remember that JavaScript tries to hide the distinction between “integer” and “floating-point”, calling both just “number”. It would be a logical consequence of this to not overflow values that don’t fit within some limited integer range, if your intention is to hide the fact from your users that there are even such things as integers.
2
Hey, it was a chance to use the old “you should see the other guy” joke ...
2
I had a look at the MDN page (probably the most readable description I could find), and apart from warning about non-numbers being implicitly coerced into numbers, it says nothing like this. There are situations where delays may last longer than expected, but they should never be shorter. So it seems like this is some kind of weird Chrome/Chromium bug.
1
Given that you can cancel a scheduled timeout, why not allow infinity? Then you avoid special-casing the situation where “did I schedule a timeout, or didn’t I?”.
1
@FlareGunDebate It’s just a table entry. Think of it as a disabled table entry.
1
@FlareGunDebate It’s not a stack.
1
@FlareGunDebate No call frame because no function is called. Like I said, it’s just a table entry, nothing more. Just that, in some situations, it is slightly easier to always have a table entry, than to remember whether there is one or not. Should be a minor issue, not a major one.
1
@FlareGunDebate It’s part of the definition of “number” in JavaScript.
1
@FlareGunDebate Doesn’t say that anywhere in the spec.
1
@FlareGunDebate It’s a “number” according to IEEE-754, and therefore to JavaScript.
1
@FlareGunDebate Of course it can be represented computationally. IEEE-754 defines its behaviour, and JavaScript follows that in other areas, and other IEEE-754-conforming languages manage it just fine. In short, don’t act maths-ignorant. Unless maybe you’re thinking of running for political office...
1
@FlareGunDebate “infinity. ... a number”. Like you said. It has logical properties that a computer doesn’t need to “approximate”, because it can implement them exactly.
1
@FlareGunDebate Now who’s the one being “obtuse”?
1
So basically, it is V8 that is shitty.
1