KDE 4 namespaces

David Faure faure at kde.org
Mon May 9 13:37:34 BST 2005


On Monday 09 May 2005 14:29, Ilkka Hakkari wrote:
> 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. 

You'll have the same problem with Qt then... QString and QLineEdit come from
differeet libs, but they both start with Q.
What can help for this, other than documentation, is #include <QtCore/QString>
vs #include <QtGui/QLineEdit>, so maybe we want to do the same in KDE

> One thing is the most important: consistency.
... with Qt? Then this means not using namespaces :)

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list