IDL language

David Zeuthen david at fubar.dk
Mon May 11 06:38:17 PDT 2009


Hey Mark,

On Mon, 2009-05-11 at 09:34 +0100, Mark Doffman wrote:
> I understand that you have your own ideas for what an IDL should look
> like, but I'm willing to modify what I have to accomodate them. I'm also
> willing to put in the work to complete a decent IDL parser and translator.

I didn't know you had written a parser for this already. I think it
would be useful to work on this together; in fact I think it would be
useful to have a standard "D-Bus IDL" language (and tools) in the D-Bus
spec module

 - since we already define interfaces, enumerations in the spec; and

 - the spec itself already uses a pseudo-IDL langauge; and

 - doing dbus2idl /usr/share/dbus-1/typelibs/org.example.Foo.xml
   and getting human-readable stuff is A Good Thing(tm).

but that's more long term thing and something we can bolt on to the
D-Bus project should we end up with a really good IDL language. 

Anyway, right now we have two IDL languages which is not exactly ideal. 
Some comments

 - I prefer the use of in/out, e.g.

    Foo (in  double a,
         out int32 b,
         in  int64 c);

   rather than

    method Foo {double a, int32 tv} reply {dub}

   also you can express the former in the latter (ordering might
   matter, most of the time it won't though). And it's more C-syntax
   like (and lots of languages are built upon C syntax).
 - What do you think of the dynamic_struct construct?

 - Not sure I like "throws" - most languages don't have checked
   exceptions, then again, it's actually useful to know what errors
   a method may throw (in addition to standard network/IPC exceptions).
   I don't know.

 - Do you plan to add support for parsing gtkdoc-style docs?

    David




More information about the dbus mailing list