Namespacing in kdevelop/lib
Andras Mantia
amantia at kde.org
Wed Jul 19 07:50:43 UTC 2006
On Wednesday 19 July 2006 10:36, Florian Hackenberger wrote:
> On Wednesday 19 July 2006 02:07, Adam Treat wrote:
> > My vote is KDev ...
> > We already name all of the libs libkdev* and all of the files are
> > currently kdev* (although this is _highly_ annoying) so why not the
> > namespace too?
>
> What about combining the two suggestions (KDev and KDevelopPlatform)
> into KDevPlatform, which ist a bit shorter that KDevelopPlatform, but
> still informative?
Personally I'm against namespacing KDevelop libraries. Sure, it looks
nicer if you write KDevelop::Plugin instead of KDevPlugin, but it is
long, so most probably everyone will write "using namespace KDevelop"
and just use "Plugin" later. From this point if you mix several
namespaces, it will be hard for a reader to find what kind of Plugin we
are talking here. Even worser, there will be a KDevelop::Document and a
KTextEditor::Document, and it is very common in KDevelop to use
KTextEditor classes.
For forward declarations I find
namespace KDevelop {
class Document;
}
uglier than
class KDevDocument;
But if you anyway want to namespace it, call simply KDevelop. Calling it
"KDev" doesn't bring any extra readability (even now all classes start
that way), KDevPlatform is also a cryptic name, KDevelopPlatform might
be good, but it is long.
Andras
--
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20060719/e21fa14f/attachment.sig>
More information about the KDevelop-devel
mailing list