thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Duxbury <>
Subject Re: heterogeneous collections
Date Mon, 03 May 2010 14:09:42 GMT
Generally, we've said that it could be possible, but we haven't made it so

My personal preference would be not to support this. I understand the need
for heterogeneous collections, but I think that "any" is a pretty broad
category to allow in a collection and not have to compromise something.

There is already a totally viable workaround, though - make a Union of the
types you want in your collection, and then make the field list<YourUnion>.
You get basically all the capabilities with very few drawbacks, plus the
ability to include multiple logical "types" in the collection, not just
physical types. Of course, if you literally need "any" possible object to go
into the collection, then this won't do it for you.


On Sat, May 1, 2010 at 10:40 AM, Alex Boisvert <> wrote:

> Hi,
> I'd like to use an heterogeneous collection, e.g. list<any>, in a service.
> I see there's been some work/discussion on this earlier,
> Now THRIFT-110 is committed and claims to incorporate THRIFT-122.
> I've looked around but couldn't find the answer... how do I declare an
> heterogeneous collection in a .thrift definition?
> alex

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