Starting the kdbus discussions

Havoc Pennington hp at pobox.com
Thu Jan 2 18:00:47 PST 2014


Hi,

On Sun, Dec 29, 2013 at 3:29 PM, Lennart Poettering <mzqohf at 0pointer.de>wrote:

> The flags are no "arbitrarily" inverted. We simply dropped the weird
> inversion that dbus1 had there in the first place. Moreover, this is
> not visible to the outside anyway, as applications should connect via a
> library such as libsystemd-bus, or gdbus to the thing, and those library
> trivially abstract the app developer away from this diffrence.
>

I haven't read this whole thread or the spec (just saw it), but I think I
remember the historical context on this one.

I believe the no-flags (flags=0) case is supposed to be sensible defaults
and the flags are supposed to be the thing you'd opt into because you know
what you are doing. There may even be discussion in the archives about
flipping them for this reason, I don't know.

If the API (protocol doesn't necessarily matter, but people writing APIs
may tend to just follow it) defaults to something like "don't reply" then
it will result in confused app developers. Of course an even better API may
not require app developers to specify this kind of stuff.

To avoid funky negation in flag names, you could also rename them (e.g.
DONT_EXPECT_REPLY => FIRE_AND_FORGET) rather than inverting them. That
would keep 0 as the safe default and common case, which I do think is
helpful.

Havoc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20140102/69b9cd01/attachment.html>


More information about the dbus mailing list