[
https://issues.apache.org/jira/browse/THRIFT-409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699404#action_12699404
]
Bryan Duxbury commented on THRIFT-409:
--------------------------------------
bq. In the parser, make it accept struct or union as the beginning of the
definition, rather than creating a whole separate rule for unions.
I'd be open to this change, but I'm not exactly clear on how all the parser
stuff works. I did more of a copy and paste approach than a genuine change.
bq. ... just make unions a special structure ...
I was sort of going for this, though I can see how it would make sense to
refine it a little. My overall intent was to diverge the code generators quite
a bit between structs and unions, since I'm expecting to be able to do a lot of
simplifying things for unions. (Take a look at the TUnion base class that's
included in the patch - there doesn't have to be as much generated code in
unions as structs.)
> Add "union" to Thrift
> ---------------------
>
> Key: THRIFT-409
> URL: https://issues.apache.org/jira/browse/THRIFT-409
> Project: Thrift
> Issue Type: New Feature
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Fix For: 0.2
>
> Attachments: thrift-409.patch
>
>
> It would be very helpful to have a "union" construct in Thrift. Let's decide
> on the design and then break up into sub-issues to add this feature.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.