Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for an Arbitrary Precision Integer Type #505

Open
InsertCreativityHere opened this issue Mar 29, 2023 · 0 comments
Open

Add Support for an Arbitrary Precision Integer Type #505

InsertCreativityHere opened this issue Mar 29, 2023 · 0 comments

Comments

@InsertCreativityHere
Copy link
Member

InsertCreativityHere commented Mar 29, 2023

I propose adding support for signed integers of arbitrary size!

The vast majority of languages I know of support them either at the language level or often with a standard library type:

  • C# has BigInteger.
  • Go has big.Int.
  • TypeScript has BigInt
  • Java has BigInteger (Which is what Kotlin uses too).
  • Python supports arbitrary sized integers out of the box.
  • Rust used to have BigInt in the standard library but they split it off into a separate crate apparently: BigInt

So there are obvious targets for what we could map this type to in each language.
And the implementations to encode/decode these would be trivial to write. It's just bytes and bit-shifts.

Such a data type has obvious utility, and is general-purpose enough to be useful for a variety of situations.
I think these make it a good candidate for a WellKnownType expressed as custom BigInteger in Slice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants