amazon-ion / ion-go

A Go implementation of Amazon Ion.
https://amazon-ion.github.io/ion-docs/
Apache License 2.0
174 stars 31 forks source link

Decide whether `Uint64` makes sense as an `IntSize` variant #102

Closed zslayton closed 4 years ago

zslayton commented 4 years ago

The IntSize type includes a Uint64 variant.

On one level, this makes sense: there are values which cannot fit in a signed 64-bit integer but which are not so large that they require a BigInt and the accompanying overhead. However, Ion integers are always signed; declaring that the size of a given int (its IntSize) is actually a different type (an unsigned int) is a bit confusing.

I'm not sure it's worth the complexity to optimize for the representation of values in the range [(2^63)-1, (2^64)-1]. We don't accommodate this case in our other language bindings.