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

Aleksey Pesternikov commented on THRIFT-2429:
---------------------------------------------

Wait. What would combination 
{code}
1: required i32 x =? 5
{code}
means? Required field not on wire?
and another combination 
{code}
1: optional i32 x = 5
{code}
seems still broken since it is acting exactly like _required_. What _optional_ 
means exactly?
Introducing new *=?* operator creates confusion while we already have a knob to 
control whether field should be sent always or only when set. and BTW when 
field it is not set it gets default value. What exactly was wrong with fixing 
*optional with default* combination?

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

Reply via email to