Javascript中的原生64位整数 [英] Native 64bit integers in Javascript

查看:909
本文介绍了Javascript中的原生64位整数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎即使是最新的 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.

这篇关于Javascript中的原生64位整数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆