Hello,
I have been working with protobuf for a few months. I've noticed a very bad
pattern: I had to copy and paste data types again and again.
For example, let's say we have the `User` type with `username`, `mail` and
`name`. Now, we want to add a `SearchUserRequest`, which is the same as
`User` but its fields are inside a `oneof`. Now, we'll have to copy all of
`User`'s fields to `SearchUserRequest`'s `oneof`. That causes code
duplication which leads to duplicate messages and a pain to maintain.
My idea was to add a special macro-message which builds a new message on
top of the other one. For example (Pseudo code):
mutate User as SearchUserRequest {
# Disallow searching by email.
remove email;
}
Please let me know if you think the same, if there is another way to solve
this problem, and what do you think about my solution.
Shmuel.
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.