Closed katelynsills closed 4 years ago
Yes. In fact, once we verify that BigInt exists on all our target platforms, we should consider incrementing the major version number and switching Nat to only emit BigInts. For that version, an open question:
Should Nat
also continue to accept the numbers it accepts now, making it into a coercer, or should it only accept BigInts, preserving its nature as a pure verifier? If a coercer, should we change its name to BigNat
?
In fact, once we verify that BigInt exists on all our target platforms
Verified. We should switch to BigInt soon and stop worrying about exceeding the SAFE_INTEGER range of floats.
Great, let's add this to our todo lists
Question: Should we allow numbers
and BigInts
or only BigInts
?
It seems like we can support both. My main worry was that supporting both would encourage inadvertent coercion between BigInts
and numbers
if both are valid Nats
, but it appears that any operations including both throw a TypeError.
All extents that represent integers or natural numbers should be switched all the way to only BigInts. We should not try to support both BigInt and Number. Now that we have a monorepo, it'll be interesting to see if we can avoid a transitional phase where we temporarily support both.
Ok, great. I think the transitional phase should be smooth since this repository isn't part of the monorepo, so we can simply make sure to make this a major change as per semver and then the various packages in the monorepo can choose when to upgrade on a per package basis
Closed by #112
We need to add support for BigInt.