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

Chad Walters commented on THRIFT-122:
-------------------------------------

Alex, clearly Noble sees some advantages to this for his use cases, so let's 
not dismiss it out of hand.

I agree that the C++ implementation has some challenges and I'd like to see 
some proposals regarding the C++ implementation as a key part of the design of 
this feature.

I also agree that this will require support in all the existing protocol 
implementations.

I will note that this can, however, be added in a backwards compatible manner 
by adding new first class types. Those who don't wish to use these types can 
simply avoid using them in the IDL. Unless they complicate the implementation 
tremendously, I don't see why we shouldn't at least explore what this might 
look like.

Noble, can you provide more specifics on what you would like to see? The 
initial comment is incomplete. Is it good enough to support only 
non-homogeneous base types (integer, float, or string)? Or do you require 
non-homogeneous collections to support compound types and nested collection 
types as well?

> Allow heterogeneous collections
> -------------------------------
>
>                 Key: THRIFT-122
>                 URL: https://issues.apache.org/jira/browse/THRIFT-122
>             Project: Thrift
>          Issue Type: New Feature
>            Reporter: Noble Paul
>
> Currently thrift only supports homogeneous collections . But , that is very 
> restrictive for many languages which allows heterogeneous collections
> implementation details 
> the IDL can allow syntax 
> {code}
> list<?>
> set<?>
> map<?,?>
> map<?,the-type>
> map<the-type,?>
> {code}
> While writing down data use a type modifier to say whether key (1), value(2) 
> or both(3) are wild cards
> for a List/Set use a type modifier 1 to specify that it is heterogeneous
> If it is a homogeneous collection do it the way it is done now.
> Or else
> add type information just before the data. So it adds an extra byte/element 
> For ma

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to