[
https://issues.apache.org/jira/browse/THRIFT-2429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13973394#comment-13973394
]
Dave Watson commented on THRIFT-2429:
-------------------------------------
I like the new proposal since it works for both optional and normal - one
question though:
For the ~ operator, as an implementation detail mostly: Does this mean the
value of the field will be checked against the default value (a potentially
expensive operation) or that we will check *if the user set the value*?
Checking if the user set the value is hard in some langs like C++ that don't
have getters/setters, are we going to check isset or that x == default? In
python I imagine the easy way would be to check the value against the
thrift_spec, but this would still send if the user did x =
Struct(...defaults...).
Or will this be a language by language detail?
> 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)