[
https://issues.apache.org/jira/browse/THRIFT-2471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13972071#comment-13972071
]
Dave Watson commented on THRIFT-2471:
-------------------------------------
It's necessary for languages that use value semantics - CPP being the primary
example. Not necessary for ones that use fully boxed types - php, py, etc.
Making it a general annotation sounds like a fine proposal - although it would
only be necessary for some languages and not all, I'd probably still argue for
just an annotation vs. a first class part of the IDL
It can't be inferred - if we have a struct A that contains a B, and B contains
an A, what do we do? Are they both references? Or just one? Which one?
Protobufs solves this by making everything a reference.
> Make cpp.ref annotation language agnostic
> -----------------------------------------
>
> Key: THRIFT-2471
> URL: https://issues.apache.org/jira/browse/THRIFT-2471
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (General)
> Reporter: Jens Geyer
>
> The proposal is to make the new {{cpp.ref}} annotation introduced with
> THRIFT-2421 language agnostic instead of a C++ specialty only.
> The annotation changes inlined nested structs into pointers to structs. This
> behaviour is potentially relevant with all languages using value semantics
> for nested structs etc.
--
This message was sent by Atlassian JIRA
(v6.2#6252)