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.
-
You can reply to this email to add a comment to the issue online.

Reply via email to