I think it would be great to comment in place e.g. `/* required */ optional
<field>`.
It's difficult enough as is to extract the semantics out of the current
Protos. The required helped document which fields were actually required.

—
*Joris Van Remoortere*
Mesosphere

On Thu, Jun 23, 2016 at 2:40 AM, Jie Yu <[email protected]> wrote:

> +1
>
> Proto3 killed 'required' keyword.
>
> On Wed, Jun 22, 2016 at 5:15 PM, Jay JN Guo <[email protected]> wrote:
>
> >
> >
> > Hi,
> >
> > I find marking protobuf field as 'required' sometimes causing trouble:
> > serializing a message without filling up required field generates errors
> > and this is hard to change due to backwards compatibility. And this
> message
> > type is actually discouraged by protobuf:
> >
> >
> https://developers.google.com/protocol-buffers/docs/proto#specifying-field-rules
> >
> > So is there a particular reason we are doing it? I would suggest to use
> > optional and repeated onwards if possible and add more verification logic
> > instead.
> >
> > /Jay
> >
>

Reply via email to