IDL language

Alexander Neundorf neundorf at eit.uni-kl.de
Sun May 10 23:43:24 PDT 2009


On Friday 08 May 2009 22:04:24 David Zeuthen wrote:
> On Fri, 2009-05-08 at 21:35 +0200, Lennart Poettering wrote:
> > On Fri, 08.05.09 13:47, David Zeuthen (david at fubar.dk) wrote:
> > > On Fri, 2009-05-08 at 19:06 +0200, Lennart Poettering wrote:
> > > > If D-Bus was new and not yet as widely used adopting a different
> > > > language than XML could have been a good idea. But now?
> > >
> > > My experience with several dialects of introspection XML (at least
> > > three: Telepathy, ConsoleKit/DeviceKit-disks and eggdbus dialects) is
> > > something I'd rather be without. It's hard to get right, easy to get
> > > wrong and if you show it to someone, they just give you that blurry
> > > look like it's Ada or FORTRAN or ask you if you made money on fixing
> > > Y2K bugs in a previous life. So, no, D-Bus introspection XML is not
> > > something that _I_ want to show to a new person on my team, for example
> > > (not unless I wanted them to nominate me as the PHB on The Daily WTF or
> > > something).
> >
> > Maybe you are doing something wrong if you just show the XML sources
> > around. I mean, stuff like the following doesn't look too bad, does it?
> >
> > http://avahi.org/download/Server.introspect.xml
> >
> > This is pretty old stuff, now if we'd have the documentation stuff
> > properly integrated into the XML format this could look much, much
> > prettier.
>
> That's not the point. Of course I use an XSLT script to generate docbook
> from so I get e.g.
>
> http://hal.freedesktop.org/docs/DeviceKit-disks/Device.html
>
> from the abomination that is the 2385 lines of annotated introspection
> XML for the same
>
> http://cgit.freedesktop.org/DeviceKit/DeviceKit-disks/tree/src/org.freedesk
>top.DeviceKit.Disks.Device.xml
>
> Because, sure, it's easier to read HTML with hyperlinks than this XML
> thing.
>
> > I don't find this particular example that unreadable. And with some
> > XSLT sugar this could actually really nice. Much nicer than a C
> > inspired low-level syntex ever could. But yepp, that's just a matter
> > of taste again.
>
> It's not so much about reading. The point is really that I shouldn't
> need to edit some weird dialect of XML to describe a service that is
> much easier described in a domain-specific language. I shouldn't need to
> read/write XML either when discussing an interface on a mailing list
> either. And I shouldn't need to mentally parse XML when I'm looking
> in /usr/share/dbus-1/interfaces either.

I don't see the big difference to having to parse another IDL dialect.
E.g. the telepathy one creates nice docs:
http://telepathy.freedesktop.org/spec.html#org.freedesktop.Telepathy.Connection
And it is also quite readable:
http://git.collabora.co.uk/?p=telepathy-glib.git;a=blob;f=spec/Connection_Interface_Contacts.xml;h=1033e0453c6bfd1056b3747672ee80f1f01007fc;hb=HEAD

> No amount of so-called XLST "sugar" is going to fix how you actually

I wouldn't call anything related to XSLT "sugar" ;-)

Alex


More information about the dbus mailing list