KDE 4 namespaces

Fred Schaettgen kde.sch at ttgen.net
Mon May 9 19:21:59 BST 2005


On Monday, 9. May 2005 15:41, Adam Treat wrote:
> On Monday 09 May 2005 12:15 pm, Christian Stoitner wrote:
> > and you realy think K::Class oder Kde::Class or KdeCore::Class is so much
> > harder to understand than KClass?
>
> No, it is not _so_ much harder to understand, but it is _inconsistent_ with
> Qt.  Now, if there were a _compelling_ technical reason to switch to
> namespaces, then I'd be all for ignoring this _inconsistency_, but in the
> abscence of one, I see no reason to switch just for the sake of whim.

A well structured auto completion function seems to be a very compelling 
reason to me. Without namespaces, an IDE can only offer you an incredibly 
long list of choices.
I had to do some Java programming during the last weeks using eclipse. Have 
you ever tried it? I didn't have to look up a class in the documentation 
_once_, even though the Java API is huge. I don't know how good kdevelop is 
when it comes to autocompletion and namespace, but if it works, then 
namespaces would be very helpful. Even if they are nested. Namespaces have 
well defined sematics for IDEs and other tools - prefixes don't. 

Speaking of eclipse - if you type something that is fully qualified with all 
namespaces, then eclipse automatically chops the namespaces of and adds an 
import statement at the top. Works very well, even though there are 
interfaces in the API with names like "List". If there is a name clash, you 
can still use namespaces. 
Maybe I'm comparing apples and oranges, but Ilkka really has a point here.

Fred

-- 
Fred Schaettgen
kde.sch at ttgen.net




More information about the kde-core-devel mailing list