Hi *,
I know, I read it somewhere but I couldn't find it again, neither in the
code, the whitepaper nor in the Wiki. But somewhere there is a remark or
comment about why recursive types are not supported in Thrift. However, we
frequently run into a situation where we experience the need for such
structures, e.g. with hierarchical data:
struct treenode
{
1: string name
2: list<treenode> childs
}
Similarly, one could not do things like the following with Thrift:
struct foo
{
1: bar somefield
}
struct bar
{
1: foo anotherfield
}
I would really like to see Thrift enhanced here. Especially transporting
hierachical data through a Thrift-based API causes a lot of extra headaches.
So here are my questions:
(1) Could anyone provide a pointer to the comment or remark I mentioned
above?
(2) What could prevent us from enhancing the IDL this way? Particularly, do
you see any obious (or not-so-obvious) major problems here with the parser
and the generators?
(3) Do all supported languages allow such constructs?
Thanks in advance for any input you might have,
JensG