KDE 4 namespaces

Thiago Macieira thiago at kde.org
Sun May 15 16:09:43 BST 2005

[and you thought I would let the discussion die...]

Thiago Macieira wrote:
>with KDE 4 porting now imminent, I thought it was time to start the
>discussion on namespaces.

Ok, summarising how the discussion went, as someone so delicately put it, 
I lost :-)

The longer version of that is that we don't want namespaces throughout the 
KDE libraries. That's not my personal preference, but the majority here 

We have two big groups of libraries:
- the core libraries, which don't use namespaces, and are there mostly to 
build upon Qt [currently, libkdecore, libkdeui]
- KDE's own further libraries and technologies, which do use namespaces, 
even if erratically (think libkio) [kparts, kio, kdeprint, kabc, 
kdnssd, ...]

The consensus I have seen here is that we want:
1) to keep the existing core libraries without namespaces
2) to use namespaces on the other libraries
3) harmonise/normalise the namespace usage and naming

Please correct me if I'm wrong.

The issues to be solved, then, would be to:
a) decide what the namespace names should be. We are currently simply 
using a flat namespace, beginning with K or KDE.
b) clean up KIO & kdecore
c) move on to discussing header naming

Which brings me to libkdenetwork. Qt4 has three base libraries: QtCore, 
QtNetwork and QtGUI. We have two natural counterparts of those libraries 
already, but not for QtNetwork. I'd like to see that fixed, with the 
introduction of libkdenetwork in kdelibs.

That library would consist mainly of my own classes that are already in 
libkdecore, which are already namespaced. So libkdenetwork falls into a 
grey area. It is a core library, so it wouldn't take namespaces. But on 
the other hand, it would be a new library (which would get namespaces), 
and pragmatism would call for keeping namespaces where they already are.

Ideas? Comments?

  Thiago Macieira  -  thiago (AT) macieira (DOT) info
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

5. Swa he géanhwearf tó timbran, and hwonne he cóm, lá! Unix cwæð "Hello, 
World". Ǽfre ǽghwilc wæs glæd and seo woruld wæs fréo.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050515/a185b0e3/attachment.sig>

More information about the kde-core-devel mailing list