IDL language

Simon McVittie simon.mcvittie at collabora.co.uk
Mon May 11 05:06:13 PDT 2009


On Fri, 08 May 2009 at 12:45:50 -0400, David Zeuthen wrote:
> On Fri, 2009-05-08 at 17:32 +0100, Simon McVittie wrote:
> > If you're doing anything like this, please consider naming types and other new
> > constructs using Ugly_Case (camel case with underscores at word boundaries),
> > like Telepathy does.
> 
> Not sure exactly what you want me to do. It sounds more like this is
> stuff that should go into a "IDL programming guide" as how people should
> name their methods/properties/signals, no? I mean, binding generators
> are free to do whatever they want.

My point is that if the definition of the IDL says that things are named
using Ugly_Case, then transforming the IDL into the case conventions used by
any language I can think of becomes trivial, whereas if the IDL uses a different
case convention, mapping into other case conventions requires tricky heuristics
which are unlikely to be right every time.

(I'm assuming you want the generated GLib API to look like GLib, the generated
Java API to look like Java, and so on, in terms of how things are
capitalized - like dbus-glib and telepathy-glib, and unlike dbus-python.)

We don't yet have *any* convention for how named structs in D-Bus are named,
so your IDL and Telepathy's introspection extensions are free to invent a
convention. Given that, I'm keen for the convention we invent to be one that
avoids the problems we've seen when generating bindings into non-camelcase
languages, particularly the C/GLib names_like_this convention, when using the
existing convention that D-Bus methods/signals/properties are named in
CamelCase.

    Simon


More information about the dbus mailing list