似乎即使是最新的 Ecmascript 8 不支持64位整数。
It seems that even the newest Ecmascript 8 has no support for 64bit integers.
目前我们必须使用库,例如很长或 UInt64 或 Closure Library 。
Currently we have to use libraries, like Long or UInt64 or Closure Library.
技术上是否可以在Javascript中为64位整数添加本机支持?
Is it technically possible to add native support for 64bit integers in Javascript?
推荐答案是的,确实如此。有一个第3阶段 提议用于任意bigints(包括足以允许实现专门用于固定的64位使用),所以它实际上只是等待实现和测试。因此,可以得出结论,这在技术上是可行的。
Yes, it is. There's a stage 3 proposal for arbitrary-bigints (including enough to allow implementations to specialize fixed 64-bit use), so it's literally just waiting for implementations and tests at this point. Therefore, one can conclude that it's technically possible.