[RFC] Solid and use of namespaces
David Faure
faure at kde.org
Sun May 21 17:08:46 BST 2006
On Sunday 21 May 2006 17:22, Guillaume Laurent wrote:
> On Sunday 21 May 2006 16:50, David Faure wrote:
> >
> > The difference is that in a .cpp file you can do
> > using namespace Power;
> > Manager(...); Battery::isFilled();
> > etc.
> > which avoids filling the file with "Power" everywhere.
>
> Yes, but it doesn't necessarily make for more readable code, especially when
> the class name degrades to something very generic without the namespace,
> like "Object" or, as you chose yourself, "Manager". When such code is mixed
> with other libs which have similarly named objects, it doesn't look good.
I agree. I was merely answering Thomas' question about the usefulness of namespaces
in general compared to long class names, but I of course fully agree with you that
in this case it wouldn't be a good idea to do so.
--
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