[
https://issues.apache.org/jira/browse/THRIFT-238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664555#action_12664555
]
Kevin Clark commented on THRIFT-238:
------------------------------------
I'm not sure I like the idea, but if we wanted to do it, we could probably just
add a second, optional, arg to the generated initialize.
> 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.