3 ms·
What I wish ECMAScript had was true support for number types other than the default 32-bit float. I can use 32 and 64 bit integers using "asm.js", but this intr
by flavio81 9y ago
What I wish ECMAScript had was true support for number types other than the default 32-bit float. I can use 32 and 64 bit integers using "asm.js", but this introduces other complications of its own -- basically, having to program in a much lower level language.
It would be nice if EcmaScript could give us a middle ground -- ability to use 32/64 bit integers without having to go all the way down to asm.js or wasm.
- arthurdenture 9y agoThere's a BigInt proposal at stage 2, which might meet some of your needs: https://github.com/tc39/proposal-bigint https://github.com/tc39/proposal-bigint
- hzoo 9y agoIt's parseable in Babel 7, issue to implement the transform is https://github.com/babel/proposals/issues/2 https://github.com/babel/proposals/issues/2
- buu700 9y agoTangential to your point, but JS numbers are actually 64-bit floats (capable of safely representing 53-bit ints), not 32-bit. But yes, 100% agreed; this is a major pain point of the language right now. Nice to hear that there's finally some movement on fixing it (as per arthurdenture's comment)!
- deleted 9y ago[deleted]