# Do golfing languages support arbitrary-length integers?

During a conversation in my proposed challenge in sandbox, there had been some objections about requirements in the challenge.

I want to entirely ban a usage of floating-point numbers in the challenge, but as turned out in the discussion, that must be only if the inputs are arbitrary-length integers.

Do major golfing languages such as 05AB1E, Jelly, APL, and Charcoal natively support arbitrary-length integers like Haskell's Integer? Otherwise, my challenge will be very different from what I intended.

• Brachylog does, but I wouldn’t call it a major golfing language. – Fatalize Feb 13 '20 at 7:49
• (Expect @Adám to cry about APL being in a list of golfing languages) – Fatalize Feb 13 '20 at 7:49
• I won't call Charcoal a major golfing language just because only Neil is currently using it. – user92069 Feb 13 '20 at 8:02
• natively support arbitrary-length integers I see 3 options, rather than 2: (a) They don't; (b) They do, and arbitrary-length integer is a default type; (c) The do, but an explicit data type conversion or declaration is needed, which costs bytes – Luis Mendo Feb 13 '20 at 15:59
• Pyth natively supports arbitrary length integers, because Python does. – isaacg Feb 14 '20 at 19:35
• for me it depend from library… if a Language can have extern function in a library and exist one bignum library for that Language… all is possible... – user58988 Mar 10 '20 at 22:00

# APL

… is not a golfing language.

That said, some APL implementations, like NARS2000, feature arbitrary-length integers. Others, like Dyalog APL, have a library that provides this functionality. Additionally, some APL derivatives, like J, do too.

• APL isn't a dedicated golfing language, but I'd be hard-pressed to show it isn't a golfing language at all - it is prime for golfing. It's not dedicated like OSABIE, but it's a language of one-character functions - I'd definitely call it golf-forward. – Mathgeek Feb 20 '20 at 20:58
• @Mathgeek Some languages lend themselves well to golfing, but some were created specifically for golfing. For instance, APL's keywords and system names can have quite verbose syntax and names. Also, how would you regard J which features both one, two, and three character built-ins, but doesn't use Unicode at all, this "wasting" a bit of every byte? – Adám Feb 20 '20 at 21:03
• J is what I call "a waste of golfing opportunity". Jelly is peak golf. – Mathgeek Feb 21 '20 at 13:22

Some non-golfing languages do not have builtin support for arbitrary-length integers, including but not limited to:

• C
• C++
• Assembly/machine code
• Probably some others

Don't tell me about any third-party libraries that provide support for these.

I can't see your sandbox post so I don't know if this challenge is possible in these languages.

• Assembly language / machine code doesn't either, and a few of us golf in machine code. (Most ISAs have some instructions that make it easier to implement arbitrary precision than in C, e.g. a carry flag and widening multiply, but you still have to write everything yourself and it takes much more code size than plain add). So yes, totally agreed that requiring arbitrary precision has a lot of collateral damage if you really just want to ban usage of FP. Also very unequal costs across languages; e.g. some non-Python languages will require you to type BigInteger or something. – Peter Cordes Feb 18 '20 at 8:47
• C and C++ and assembly with some bignum library are fine for support bounded from memory, arbitrary-length integers – user58988 Mar 10 '20 at 21:58
• @S.S.Anne i know in C exist library for all not only bignum... – user58988 Mar 11 '20 at 20:14