4 ms·
I'm not sure what kind of web frameworks they have in mind, but "specialized scientific applications" is not the only reason for it -- BigInt is the only way to
by dchest 3y ago
I'm not sure what kind of web frameworks they have in mind, but "specialized scientific applications" is not the only reason for it -- BigInt is the only way to get standard 64-bit numbers (uint64/int64) in JavaScript without emulating them, since JS number type, aka 64-bit floating point, is limited to 53-bit integers. There are also Big[U]int64Array container types to load/store 64-bit arrays of integers from ArrayBuffer.
- webmobdev 3y agoOk, but what other use cases are there for using this datatype? (Particularly in a web framework).
- throwaway98367 3y agoCan you show an example of a web framework using BigInt? I went looking and didn't find any. Angular has a single instance of it in the client code where they do a SHA1 digest. That's it.
- webmobdev 3y agoI honestly wasn't even aware this was an issue. But someone who works with browsers would obviously encounter such issue that they have to address, and that's why I quoted the specific excerpt from Pale Moon release notes. A search for "BigInt" in their forum does display a lot of complains about it - https://forum.palemoon.org/search.php?keywords=bigint https://forum.palemoon.org/search.php?keywords=bigint ... Angular is mentioned (and it is popular) but it could be that the release notes may not be talking about the popular frameworks but just generic "web framework" in general.
- dchest 3y agoIt don't know why it would be "an issue" — it's a part of the ECMAScript standard. Do they only implement new language features when something breaks and then wonder in release notes why somebody would use these features? Seems like not a good way to develop a modern browser.