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
Proposal for a 128 bit type #2180
Comments
Transferring this type as bytes (i.e. with the length-delimited wire type) sounds like a good idea. That way we would have the option of implementing it first just for one or two languages, and other languages without support for it could at least handle the data gracefully (e.g. by treating it as an unknown field or just a bytes field). I wonder what the API would look like since as far as I know most languages don't have a standard 128-bit type--maybe just the raw array of 16 bytes? |
perfect :) |
For Go you can do this nicely with a [16]byte into the struct so no extra malloc. Same goes for C when you expose the length as a constant. |
@gerben-s @jtattermusch why is this closed? |
+1 to this feature request -- we could make a good use of it in YugaByte DB as well, for UUIDs, IPv6 addresses, MVCC timestamps, etc. |
Any progress? |
I'm trying to get this one right at pascaldekloe/colfer#36. Feedback wanted. |
u128 is pervasive in blockchains. bytes is not good as cannot 7bit compress small amounts of assets which usually start from trillions. |
The need is clear. No need for more use-cases here please. Same with the status requests. Unless you have something to contribute, this feature is pending on some serious work. |
These days people communicating uuids and ipv6 addresses between processes is quite common. These can both be addressed with a 128 bit type.
Just to give an idea of how many users already want this and hack around this.
I have protobuf code generator for go (gogoprotobuf) and I have added a feature called customtype. This allows you to change a bytes type to a type of your choice, but still transfer it as bytes. This allows for quite a large variety of applications, but what people use it for is very constraint. Most users just want some 128bit type.
The text was updated successfully, but these errors were encountered: