Namespacing in kdevelop/lib

Mathieu Chouinard mchoui at e-c.qc.ca
Wed Jul 19 12:53:46 UTC 2006


On Wednesday 19 July 2006 03:50, Andras Mantia wrote:
> 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
we can simply ship with a new abbreviation let say KDP that expand to 
KDevelopPlatform  .... 
Mathieu




More information about the KDevelop-devel mailing list