[RFC] Solid and use of namespaces
zander at kde.org
Sun May 21 17:19:19 BST 2006
On Sunday 21 May 2006 16:50, David Faure wrote:
> > 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.
Oh, sorry for not being clear; I am aware of that, indeed. In the part I
wrote above I meant to say that I'd rather have 'PowerManager' and
'PowertypeBattery' in my sources then the ones you have.
I firmly believe that using namespaces to such an extreme will hinder
readability of the sources.
So, while it indeed is less to type and may make it easier to write, that
is of secondairy importance in open source due to the fact that people
will read sources many times but only write them ones or twice.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 191 bytes
Desc: not available
More information about the kde-core-devel