Re:Ask HN: Why are many Web Frameworks using BigInt?
by dchest on Sunday September 10, 2023 @12:40PM
(#37457548)
I'm not sure what kind of web frameworks they have in mind, but they are wrong regarding "specialized scientific applications" -- 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.
[ Parent
| on HN ]
Re:Ask HN: Why are many Web Frameworks using BigInt?
by webmobdev on Sunday September 10, 2023 @07:19PM
(#37461078)
Ok, but what other use cases are there for using this datatype? (Particularly in a web framework).
Re:Ask HN: Why are many Web Frameworks using BigInt?
by throwaway98367 on Monday September 11, 2023 @03:49AM
(#37464195)
Can 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.
Re:Ask HN: Why are many Web Frameworks using BigInt?
by webmobdev on Monday September 11, 2023 @02:49PM
(#37471871)
I 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 ... 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.
Re:Ask HN: Why are many Web Frameworks using BigInt?
by dchest on Wednesday September 13, 2023 @05:46AM
(#37494505)
It 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.