D/BUS IDL compiler ...

Havoc Pennington hp@redhat.com
Tue, 09 Mar 2004 17:51:42 -0500


On Tue, 2004-03-09 at 15:32, Olivier Andrieu wrote:
> 
> A problem with the "struct as dict" approach is that it introduces lots
> of overhead when transmitting arrays of structs: the complete type
> information for the struct i.e. member names + typecodes for the
> data is transmitted for each element of the array. 

Good point, I can remember thinking about that before but forgot about
it again ;-)

> Introducing a type tag for structs would fix this. Another possibility
> is to use tuples ie something like structs but without the member
> names, a (short) collection of values of different types. 

We could do structs similar to arrays, i.e. have a type signature 
"array of array of int" / "struct of int int bool string", 
to do an array do "array of array of struct of ..."

I guess this is obvious, just the way recursive types are done. What I'm
saying though is avoid the idea of "struct Foo" only have "struct of
int,int,bool" so you don't need a type name to type representation
mapping.

This is all kind of a pain to implement though, even recursive arrays
don't work quite right at the moment iirc.

Havoc