By Daniel Ehrenberg.
Slides at https://docs.google.com/presentation/d/1apPbAiv_-mJF35P31IjaII8UA6TwSynCA_zhfDEmgOE/edit#slide=id.p
Quick, what do you get when you increment Math.pow(2, 53)? If you said Math.pow(2, 53), you may be a JavaScript programmer.
From the beginning, JavaScript has supported 64-bit binary floats as its sole numeric type. In this talk, I’ll explain how, through TC39, JavaScript developers are working together with JS engine implementers and spec wonks like me to create BigInt: a native, unlimited-size integer type.
Through collaboration, any layer of software can be changed, even the language itself.
(c) JSConf EU 2018
June 2nd & 3rd 2018 — Berlin, Germany
https://2018.jsconf.eu/
52. Comparison change
● BigInt <-> String
comparison casts the
String to a BigInt
● Previously, sometimes
rounded as Number!
// Either way
0x10000000000000001n ==
"0x1000000000000001"
⇒ true
// Before change
0x10000000000000001n <
"0x10000000000000001"
⇒ true
// After change
0x10000000000000001n <
"0x10000000000000001"
⇒ false
53. BigInt to Stage 4?
● Full test262 tests ✔
● Specification PR ...
● 2+ implementations ...
● ES2019?
61. Education insight from Ashley Williams
Folks new to programming have an intuition
about types
(Helped us decide on no-mixed-types semantics)
62. Implementation
● Open-source projects accepting contributions:
○ Babel
○ TypeScript
○ V8
○ Acorn
● Features developed behind a flag/in a plugin
○ JSC
○ ChakraCore
○ SpiderMonkey
○ And many more
67. ● Get involved in TC39:
https://tc39.github.io/
● BigInt for ints ranging large
● Number for always-small ints
● Daniel Ehrenberg
● Twitter/GitHub @littledan
● littledan@igalia.com