But how does V8 represent a BigInt with a hundred, or a thousand, or a million bits? How does BigInt arithmetic work behind the scenes? @JakobKummerow explains: https://v8project.blogspot.com/2018/05/bigint.html …pic.twitter.com/fJhIpJ8JEs
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
But how does V8 represent a BigInt with a hundred, or a thousand, or a million bits? How does BigInt arithmetic work behind the scenes? @JakobKummerow explains: https://v8project.blogspot.com/2018/05/bigint.html …pic.twitter.com/fJhIpJ8JEs
How are bigInts serialized to json?
`JSON.stringify(42n)` throws a `TypeError`.
There was a lot of discussion on serializing BigInts: https://github.com/tc39/proposal-bigint/issues/24 … +@littledan
I can't explain how thrilled I'm about this. No more 0.30000000000000004 and this may even make JS a "scientific language". Thank you V8 guys and gals :)
BigInt doesn’t solve the 0.1 + 0.2 problem just yet! However, you can implement your own abstraction on top of BigInt to avoid such issues. As the post mentions, we might get something like BigDecimal in the future.
"BigInts are a new primitive in the JavaScript language. As such, they get their own type that can be detected using the typeof operator:" I don't get it ~ how can this be a 'primitive' and yet have it's own 'type?'
What do you mean? Every primitive in JavaScript has its own type (except for null, but that’s a bug we can’t fix): - bigint - boolean - number - string - symbol - undefined - (null) The only other types are for non-primitives: - function - object
@SimonMokgotlhoa how useful is this!
precision granted! super cool gotta test it out
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.