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

Jens Geyer commented on THRIFT-2429:
------------------------------------

I had only a quick look over Randy's table, and it LGTM so far. The only 
concern I have is at another level:

{quote}
Making defaults much like the field ordinals. Upon reflection this is probably 
a reasonable bit of guidance for Thrift interface design across the board.
{quote}

That sounds reasonable, but it isn't. Defaults are differently recognized by 
the average developer compared to fields IDs, or enum values, where a change 
has obvious consequences. Not so with a default, because it is "only" a 
default. 

So let's play devil's advocate and ask the question: What's the worst thing 
that will happen if someone changes a default? And should we care about that, 
or is it a non-problem?




> 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