Object paths naming conventions?

Havoc Pennington hp at pobox.com
Fri Jul 18 01:15:51 PDT 2008


On Thu, Jul 17, 2008 at 10:39 PM, Thiago Macieira <thiago at kde.org> wrote:
> However, when you're dealing with abstract concepts like "Application"
> or "Main Window" (for applications where this concept applies), then it
> does make sense to use those paths (/Application, /MainWindow
> or /Application/MainWindow, /Application/Window0/actions/file-open,
> etc.). In those cases, the interfaces will provide the "contract" to the
> calling mechanisms.

I think the argument for this is: the global or "no namespace"
namespace is reserved for the app, so the app is allowed to use it.

If I want to name a function main() or a global variable mainWindow in
my app code that's fine.

I think it's fair to consider kdelibs to be part of the app, if KDE
chooses to think of it that way. kdelibs is high-enough level to
impose policy like that.

However for a module that could be loaded into an arbitrary app, it's
bad to skip namespacing. I don't think we'd want to omit namespacing
from a session management spec or a11y spec or any other xdg-type
spec, really.

Pragmatically speaking, I concede /Application is going to create many
fewer practical problems than if multiple people use "/", since in
practice there won't be lots of people trying to use /Application


More information about the dbus mailing list