[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Namespaces in libkdecore
From: Frerich Raabe <raabe () kde ! org>
Date: 2004-05-02 14:10:35
Message-ID: 200405021610.35686.raabe () kde ! org
[Download RAW message or body]
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.
- Frerich
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic