That's so receivers that don't know about a field at least know how to skip
over it. One of the key benefits of Thrift is providing interoperability
over different schema versions, so that it's not necessary to update all
clients immediately when new fields are added to structs, and so on.

-Bill


On Mon, Oct 14, 2013 at 3:34 AM, Peter Neumark <[email protected]>wrote:

> Does anybody know why protocol.writeFieldBegin() always writes the
> following value's type to the bytestream? I know this is also done by
> protobuf, but I think writing only the field's ID should be enough (as long
> as both sender and receiver have the same idea of the type of the field).
>
> Any explanation would be appreciated!
>
> Thanks,
> Peter
>

Reply via email to