david at fubar.dk
Fri May 8 13:04:24 PDT 2009
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?
> 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.
from the abomination that is the 2385 lines of annotated introspection
XML for the same
Because, sure, it's easier to read HTML with hyperlinks than this XML
> 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.
No amount of so-called XLST "sugar" is going to fix how you actually
describe the service in the first place. Unless you write it in an
IDL-ish language and then transform it to (some dialect of) D-Bus
introspection XML. XSLT wouldn't be a natural choice for that though.
More information about the dbus