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
Represent sizes as int64 instead of uint64 #67
Comments
I understand the inconvenience, but that's a fairly large backwards incompatible change. Conceptually, the number of bytes in something is non-negative, so unsigned made sense at the time. Having to convert from int64 or int or float64 or whatever in order to format a number is an unfortunate language constraint, but it's not a logical flaw in the concept of representing bytes as non-negative numbers. |
The breakage would be trivial to fix, and the orthogonality with the rest of the Go ecosystem would make this API significantly better. I can carry out the change, as well, if you reconsider this. |
And with Go modules it doesn't have to be backwards incompatible. |
Can this issue be reconsidered? |
I think this package should accept and return sizes typed
int64
instead ofuint64
.The standard library uses int64 to represent sizes, so I do a lot of casting when using this package.
Thanks.
The text was updated successfully, but these errors were encountered: