[Kde-java] Re: GCJ (Re: Build system for KDE4)

Richard Dale Richard_Dale at tipitina.demon.co.uk
Thu Jun 16 11:56:41 CEST 2005


On Thursday 16 June 2005 12:48, Thomas Zander wrote:
> On Thursday 16 June 2005 11:16, Martijn Klingens wrote:
> > Thomas Zander said:
> > > Remembering a conversation on kdecore-devel about namespaces; the
> > > consensus was that kdelibs was not going to be adding namespaces,
> > > meaning most classes will be namespace-less.
> > > I'm inclined to use the directories they are in; so we have a
> > > kde.kparts and a kde.kdeui kde.kdecore
> > > where the last may be renamed to
> > > kde.ui and kde.core
> >
> > That's only true for the 'old' parts of kdelibs like kdeui and kdecore.
> > KParts is already namespaced, KIO was 50/50 and will become fully
> > namespaced in KDE 4. I'm not sure for new code whether it HAS to be
> > namespaced or if there's just a strong preference for namespaces.
> > Either way, assuming kdelibs to be non-namespaced is wrong.
>
> Well; I was making a point that the kdelibs was not designed around
> namespaces very well. Badly designed and half finished is possibly worse
> then not being namespaced IMO.
>
> Next to that; Java packages and C++ namespaces are used in different
> manners which lead C++ people to create huge namespaces and shallow
> trees, exactly the opposite of Java people.
> I'm still inclined to do the packages like I proposed before; based on
> which dir they are in currently.  With classes that may be moved
> specified using regexps in a config file.
Yes, ok we could just ignore C++ namespaces and base it entirely on the 
directory the include file is in for a class.

> Continuing th use the "If it starts with a Q" seems wrong to me; we need a
> build-script to call the converter and move the intelligence of which
> package we are in to that build script. So the creator of Java classes
> would be called multiple times, with different arguments.  Any other
> place to place that logic would seem out of scope IMO.
Yes, we can generate code to load HashMaps with C++ classname <--> java 
package/classnames mappings to use at runtime, instead of the "if it starts 
with a Q" test. For instance, that's what the qtruby bindings do at startup.

-- Richard


More information about the Kde-java mailing list