Which scripting languages ​​support long (64-bit) integers?

Perl has long been my choice scripting language, but I ran into a terrible problem. By default, there is no support for long (64-bit) integers. In most cases, an integer is a string, and they work to search for huge files, but there are plenty of places where, for example, they do not work, binary &, printf, pack, unpack, <<, >>.

Now they work in newer versions of Perl, but only if they are built with support for 64-bit integer support, which does not help if I want to make portable code to run on Perls without this option. And you don't always get control of Perl on the system your code is running on.

My question is, are Python, PHP, and Ruby suffering from such a problem, or do they also depend on version and build options?

+5
source share
4 answers

The size of the high-speed hardware integers (provided that the language has them) will always depend on any integers available to the compiler that compiled the language interpreter (usually C).

If you need cross-platform / cross-version support for a large integer, Perl-pragma use bigint;will do the trick. If you need more control, bigintis a wrapper around the module Math::BigInt.

, use bigint;, Math::BigInt. , , 9**9**9, , :)

+14

Python . python , . ints , . , , python .

+3

Tcl 8.5 . , ( bigints), , , ( , , bigint Unix ...)

, , - / . , ( , ).

+2

Sorry, sir, bigint and Math :: BigInt are part of the core modules. Only one of them, useit will work on any platform.

+1
source