You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Chad Walters (JIRA)" <ji...@apache.org> on 2008/08/22 15:04:44 UTC

[jira] Commented: (THRIFT-122) Allow heterogeneous collections

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

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

I am not sure that the type modification mechanism can/should be used here. Type modifications are optional hints and can be ignored by protocols. These non-homogeneous collection types cannot be ignored by the protocols -- they will require special handling by the existing protocol implementations. If we are adding support for these, I believe they should become full-fledged types.

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