Namespaces in libkdecore

Scott Wheeler wheeler at kde.org
Sun May 2 15:29:37 BST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 02 May 2004 16:10, Frerich Raabe wrote:
> On Saturday 01 May 2004 19:57, Scott Wheeler wrote:
> > On Saturday 01 May 2004 19:17, Thiago Macieira wrote:
> > > While talking to some other developers, it seems that the use of
> > > namespaces throughout KDE libraries is a wanted feature, despite the
> > > fact that it would break source compatibility.
> >
> > It needn't break source compatibility.
> >
> > namespace KDE {
> >   namespace UI {
> >     class LineEdit;
> >   }
> > }
> >
> > typedef KDE::UI::LineEdit KLineEdit;
> 
> It'll already cost you an arm and a leg to convince people to go from 
> "KLineEdit" to "KDE::LineEdit", the extra "UI" step is total overkill IMHO 
> (what's next - KURL becomes "KDE::Core::URL"?).
> 
> > Or as I would prefer:
> >
> > namespace KDE3 {
> >   typedef KDE::UI::LineEdit KLineEdit;
> > }
> 
> What such a versioned namespace could be good for is totally beyond me.
> 
> > Then people could pretty easily make things work with a "using namespace
> > KDE3;"
> 
> Doesn't that make you wonder what the switch to nested namespaces gained 
> you, if people can simply import the whole namspace and get on with life?
> 
> From what I can see, the original assumption that namespaces are a wanted 
> feature is bogus, and unless I get to see a few compelling reasons to ::-ify 
> the sources I'm not convinced of it.

Please read my earlier response to Matthias.  His mail pretty much said the 
same thing as yours and my reponce would be almost identical.  ;-)

- -Scott

- -- 
Well this should cheer you up for sure.  You see I've got your old ID and 
you're all dressed up like The Cure.
- --Ben Folds Five, "Battle of Who Could Care Less"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQFAlQXRQu0ByfY5QTkRAsHuAKDJ5Jc0qg3+A7lcz3EkpC8XDLGsIwCfWAD9
cwjKc1fR88wpt8T6wyb6jJw=
=L8YY
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list