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

David Reiss commented on THRIFT-455:
------------------------------------

That is not going to happen.  In C++, optional fields require applications to 
manually set __isset fields, otherwise they are not serialized on writing.  
Required fields throw an exception if they are absent.  The default has neither 
of these issues.  It is the most sensible choice when working with C++.  I'd be 
okay with renaming optional, though.  A few days ago, I was thinking about how 
to implement annotations for fields.  We could move optional and required to an 
annotation.

> Compiler flag to make optional/required field modifiers compulsory
> ------------------------------------------------------------------
>
>                 Key: THRIFT-455
>                 URL: https://issues.apache.org/jira/browse/THRIFT-455
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Compiler (General)
>            Reporter: Bryan Duxbury
>
> if we are unwilling to globally require users specify "required" or 
> "optional" when creating their structs, I think we should at least add a 
> command line switch that causes us to enforce that behavior. It would 
> certainly make my implementations more reliable, especially when I'm giving 
> non-experts the tools to make their own IDLs.

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