thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <a...@bizo.com>
Subject Re: heterogeneous collections
Date Mon, 03 May 2010 15:28:23 GMT
On Mon, May 3, 2010 at 7:51 AM, Mayan Moudgill <mayan@bestweb.net> wrote:

> Actually, I think you would find it problematic doing this.
>
> Let's say we have the following:
>  struct A {
>    1 : i32 v;
>  }
>  struct B {
>    1: i32 w;
>  }
>  list<any> foo(...)
>
> Assume the response to  a call to foo() is:
>  T_LIST 2 T_STRUCT 1: I32 ... T_STOP 1: I32 ... T_STOP
> There are many valid interpretations of the type: it could be a list of A,A
> or list of A,B, or list of B,B.
>

I was assuming the type of the structs was carried by the protocol and could
be carried over in the native language's collections.  Since that's not the
case, I see your point now.

alex

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message