[ https://issues.apache.org/jira/browse/THRIFT-2429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975437#comment-13975437 ]
Aleksey Pesternikov commented on THRIFT-2429: --------------------------------------------- Randy, Let's step back and define "required", "normal" (another name for opt-in-req-out) and "optional". I'm confused, because my understanding of it contradicts with just stated. {quote}The =? default is also initialized on both sides but not typically serialized by the writer. Required fields with the default value will not be serialized. Normal fields with the default value are not serialized.{quote} so required field is hmmm not required anymore? as well as opt-in-req-out... my point was - IDL already have knobs to control serialization: required, normal and optional. if "optional with default" to "send if set to nondefault" behavior we will have a full coverage of use cases. Want to use sender's default? use opt-in-req-out. receiver's? use optional. > Provide option to not write default values, rely on receiver default > construction instead > ----------------------------------------------------------------------------------------- > > Key: THRIFT-2429 > URL: https://issues.apache.org/jira/browse/THRIFT-2429 > Project: Thrift > Issue Type: Improvement > Components: C++ - Compiler > Affects Versions: 0.9.1 > Reporter: Chris Stylianou > Assignee: Randy Abernethy > Labels: default, optional, required > > Would there be any objections to a patch that does not write default values > (essentially the same logic as the optional attributes). This obviously > relies on the receiving application using the same IDL version to ensure the > defaults used on object construction match the senders. -- This message was sent by Atlassian JIRA (v6.2#6252)