Namespaces in libkdecore

Matthias Ettrich ettrich at trolltech.com
Sat May 1 19:49:00 BST 2004


On Saturday 01 May 2004 20:29, Holger Freyther wrote:
> On Saturday 01 May 2004 20:08, Matthias Ettrich wrote:
> >Now that the K prefix
> > is reserved for KDE and new versions of the libraries are released
> > together, where is the benefit?
>
> clean namespaces, clean versioning...
>

Nothing is clean if we assume that people use 'using' anyway. With regards to 
versioning: think about how you would really make use of this. Take libraries 
into account, the fact that ELF already has a version number associated with 
a shared object file, source and binary compatibility and code with 'using' 
directives. Also take readability into account. Even if the namespace is only 
KDE, KDE::LineEdit is a lot harder to work with than KLineEdit (and it makes 
the code look ugly).

Forcing people to add 'using' in every cpp-file, and KDE::FOO::BAR to every 
headerfile is a rather big change, it shouldn't be done without good reasons 
and use-cases that describe how we would benefit from the change in the 
future. "cleaner" is a weak argument for putting additional burden on 
application developers, whereas "easier" would be a strong argument. Having 
said this, "..." is a rather unspecific argument, so I don't know whether 
it's strong or weak :)

Matthias




More information about the kde-core-devel mailing list