I've recently encountered all sorts of wrappers in Google's protobuf
package. I'm struggling to imagine the use case. Can anyone shed the light: what problem were these intended to solve?
Here's one of the documentation links: https://developers.google.com/protocol-buffers/docs/reference/csharp/class/google/protobuf/well-known-types/string-value (it says nothing about what can this be used for).
One thing that will be different in behavior between this, and simple string
type is that this field will be written less efficiently (a couple extra bytes, plus a redundant memory allocation). For other wrappers, the story is even worse, since the repeated
variants of those fields will be written inefficiently (official Google's Protobuf serializer doesn't support packed
encoding for non-numeric types).
Neither seems to be desirable. So, what's this all about?