thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samir Mulder <>
Subject recursive datatypes
Date Tue, 04 Aug 2009 16:50:22 GMT

I've been using Thrift for over a year now and love it. It has really  
increased my productivity in rolling out distributes services.

But the project I'm working on now needs a feature I haven't needed  
before and Thrift does not seem to support it. And that is recursion  
in a datatype. The example is that of a folder with subfolders:

struct Folder
   1: some data....
   2: list<Folder> subfolders

The compiler does not allow this since the type 'Folder' is not yet  
defined when it reaches the 'subfolders' item.

For this particular project allowing recursion is critical. Google  
Protocol Buffers supports it but I don't really want to switch to that  
this late in the game.

Any ideas on how to work around this? Is something like this planned  
for a future release?



View raw message