[ 
https://issues.apache.org/jira/browse/THRIFT-2471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13972006#comment-13972006
 ] 

Randy Abernethy commented on THRIFT-2471:
-----------------------------------------

Hey All,

Just curious, is cpp.ref (and its proposed cross language support) necessary or 
convenience? In other words, could the compiler is_reference() function figure 
out if a struct is self referential deterministically without the assistance of 
an annotation? If so, I wonder if it wouldn't be better to do the work at the 
compiler level and keep the IDL simple (no annotation needed). 

If we are targeting support for arbitrary (not just mandatory) references and 
if this is going to apply to all languages, I wonder if it should not be a 
first class feature of the IDL (rather than an annotation).

-Randy

> 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)

Reply via email to