I concur about the impact - which would be large (for google and
others, but not for those who write new tool chains).

Yet, I do not agree, that [packed=true] is transparent to
I think the repeated and repeated [packed=true] incur different trade
offs concerning cost, especially in zero-copy scenarios where
[packed=true] allows for cheaper iteration over the set than repeated.
Also, it is not transparent for (advanced) applications who use the
"merge feature" of repeated, which is not possible in the
[packed=true] case.

On May 23, 9:39 pm, Christopher Head <hea...@gmail.com> wrote:
> Hash: SHA256
> On Thu, 23 May 2013 09:31:13 -0700 (PDT)
> Ruffian Eo <ruffia...@googlemail.com> wrote:
> > Ever since I first used protocol buffers, the construct [packed=true]
> > appeared like a temporary hack to me.
> > Here my proposal:
> > Alternate syntax (with same constraints and semantics)
> > Example Old:
> > repeated uint32 my_element = 1 [packed=true];
> > Example New:
> > packed uint32 my_element = 1;
> My opinion is no. Required, optional, and repeated are properties of
> the field that are visible to the application and affect the API by
> which the application interacts with message objects in memory. Packed
> is a property of the field that is invisible to the application (in
> normal protobuf implementations) and affects only the encoding of the
> field on the wire.
> Packed also has no effect on backwards compatibility, since packed and
> unpacked wire formats are both accepted on input no matter which way
> the field was declared in the recipient’s message definition.
> Chris
> Version: GnuPG v2.0.19 (GNU/Linux)
> iF4EAREIAAYFAlGecIEACgkQMcVpqLZH/3wjRQEAiu0sf6DBzql+kDgD/GN6kyyu
> fNfm9L6P7PvcH+HblRgA/A+R6az71h7x5uSWBejUMO2NVM+aAzA7xJB4ZBitO6+W
> =cMRD

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 protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to