You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Carl Yeksigian (JIRA)" <ji...@apache.org> on 2013/06/06 13:48:23 UTC

[jira] [Closed] (THRIFT-238) Generated structs should have constructor option to skip default values

     [ https://issues.apache.org/jira/browse/THRIFT-238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl Yeksigian closed THRIFT-238.
---------------------------------

    Resolution: Won't Fix
    
> Generated structs should have constructor option to skip default values
> -----------------------------------------------------------------------
>
>                 Key: THRIFT-238
>                 URL: https://issues.apache.org/jira/browse/THRIFT-238
>             Project: Thrift
>          Issue Type: New Feature
>            Reporter: Bryan Duxbury
>            Priority: Trivial
>
> It seems like it would be useful to have an overload (or option) on struct constructors to skip the initialization of default values. The particular use case I'm thinking about is when you are going to be using an instance of a struct to read from a protocol, and you don't want the "merging" effect that could happen if you have optional fields with default values. It could be very simple - for instance, in Java, it could just be a constructor like MyStruct(boolean useDefaults), and the existing no-arg constructor would call that with true.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira