Github user prashantv commented on the pull request:
https://github.com/apache/thrift/pull/624#issuecomment-143065168
Thanks for the feedback - I was thinking about a struct approach, but
because it's not easy to create a struct inline, I avoided that.
As you said, flags work, but lose type safety - there's no way to say that
`COERCE_DATA` is not a valid argument for `type_to_go_type`. I think it's
better to have type safety.
If you think the struct approach is better, we can do that, although calls
will then probably look like:
```cpp
DeserializeFieldOpts opts
opts.UseTrueType = true;
opts.InContainer = true;
generate_deserialize_field(out, &felem, true, "", opts);
```
I think once we decide on an approach, it should be consistently applied
for the other compilers. I'm only really working with Go, so I can only really
update the Go generator.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---