KDE 4 namespaces

Leo Savernik l.savernik at aon.at
Mon May 9 16:04:15 BST 2005

Am Montag, 9. Mai 2005 14:29 schrieb Ilkka Hakkari:
> On Monday 09 May 2005 11:25, Stephan Kulow wrote:
> > As beginner you would not just have to figure you want KConfig, no
> > you would need to figure what name space is that in, what clashes
> > a use "KDE::Core" introduces, what class names you will have to prefix
> > to make it compile again, etc. etc. For little to no gain.
> As a beginner KDE programmer I would like to see more use of namespaces in
> KDE libraries. It really is somewhat pain in the ass to try to figure out
> where actually is some class coming from.

And with namespaces the need for figuring out where some class is actually 
coming from magically disappears?

> I know that it is more typing 
> with the namespaces but my opinion is that it gives more than it takes.
> One thing is the most important: consistency. Now there are way too many
> naming conventions in KDE libraries. 

There are only 2: Start with K, or be in a namespace.

> It took me almost a week to figure how 
> to use KMDI. 

So you think replacing KMdiChildFrm with KDE::mdi::child::Frm makes it better?


This whole discussion has kicked off a "namespace hype". I concur with the 
pragmatists' view on the matter and support following Qt's approach on core 
libraries, and Qt's approach or very flat namespaces (depth one) on the rest.

Consider the amount of KDE 3 applications in existence. Providing an easy 
porting experience will contribute more to KDE's success than total API 
wreckage by some made up claims of consistency.

I'm sure trolltech discussed this issue for Qt, too. But in the end they most 
likely decided that it's not sensible to alienate their (commercial) 
developer base by inflicting a steep upgrade path upon them. Just because KDE 
has no commercial developers doesn't necessarily mean that we can complicate 
our APIs with impunity.

-------------- 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/20050509/72f0284c/attachment.sig>

More information about the kde-core-devel mailing list