[ 
https://issues.apache.org/jira/browse/THRIFT-2429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13957473#comment-13957473
 ] 

Chris Stylianou commented on THRIFT-2429:
-----------------------------------------

Hi Randy, thanks for the more detailed explanation.

I do like this approach, but it still suffers from default values being sent by 
the client if they are explicitly set. (My scenario will always set values 
(including defaults) in the struct as they are pulled from a database query).

Would modifying your first rule from "When serializing, the value is never 
serialized unless explicitly set" to "When serializing, the value is never 
serialized unless explicitly set away from the default" be acceptable?


> 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: thrift
>
> 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)

Reply via email to