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

David Reiss commented on THRIFT-627:
------------------------------------

No need to generate these at all if "pointers" is true.  Those are for internal 
use only.

Argument should be a const reference, not a value.

Indentation still seems a bit weird.  For example, line 38 of the patch looks 
too indented.

There is still trailing whitespace.

The this should be done for all non-required fields, probably.

> should c++ have setters for optional fields?
> --------------------------------------------
>
>                 Key: THRIFT-627
>                 URL: https://issues.apache.org/jira/browse/THRIFT-627
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Compiler
>         Environment: c++
>            Reporter: Ben Taitelbaum
>            Assignee: David Reiss
>         Attachments: thrift-627_0.5.x.patch, thrift-627_trunk.patch
>
>
> It seems non-intuitive to me to have to set __isset.someField = true after 
> setting an optional field someField on a struct. Would it make sense to have 
> a set_someField method that would both set the field and modify __isset?
> One of the cases for this is for when a field goes from being required to 
> being optional, and it's easy to forget to set __isset in the code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to