[RFC] Solid and use of namespaces

David Faure faure at kde.org
Sun May 21 15:50:41 BST 2006

On Sunday 21 May 2006 02:26, Thomas Zander wrote:
> On Sunday 21 May 2006 01:27, Kevin Ottens wrote:
> > By using nesting, I will introduce Solid::Network and Solid::Power
> > namespaces. It then raises some questions regarding the classes naming.
> I mostly fail to see the need for namespaces, it feels like overdesign 
> without any clear advantage, since C++ does not provide many features in 
> the user of namespaces.
> And if the advantage is Power::Manager instead of PowerManager and 
> Power::Battery::isFilled() instead of PowertypeBattery::isFilled(), well; 
> its too similar to actually accept disadvantages in my experience.

The difference is that in a .cpp file you can do
using namespace Power;
Manager(...); Battery::isFilled();
which avoids filling the file with "Power" everywhere.

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