Refactoring done (was: Strigi refactor)
Jos van den Oever
jvdoever at gmail.com
Fri Mar 16 09:47:30 GMT 2007
2007/3/16, Thomas Zander <zander at kde.org>:
> On Friday 16 March 2007 10:19, Jos van den Oever wrote:
> > Personally, I think it is ok to use the jstreams:: namespace. It makes
> > it clear what belongs to the streams and what to the analysis part.
>
> Take a look at;
> http://websvn.kde.org/trunk/KDE/kdebase/runtime/kioslave/trash/trashthroughanalyzer.cpp?revision=642668&view=markup
>
> It has 6 references to the jstreams namespace. We use the header files coming
> from strigi, we link to strigi for that code. So, from a coding perspective
> everything is strigi.
> Thats not 'ok'.
That's a valid point. If namespace is 'jstreams' the dir should also
be 'jstreams'.
Better to make it all strigi then.
> Clucene has a copy of the classes, and you depend on strigi having an exect
> copy of the code to make it all work.
> You said clucene will not change it copy of the classes any other way from
> strigi. Now, if you did get hold of that one crystal boll and can predict
> the future, we are friends. :) If not we should follow the normal rules of
> maintainable code and that includes minimizing dependencies.
This dependency on the same files is only in the _implementation_ of
the cluceneindex directory. This is not different from any other
library dependency. Our API does not depend on what clucene does. If a
future version of clucene changes the api, we change only the
implementation when we want to use that version.
> I personally think you should accept this as a problem instead of stating the
> above, and work towards a proper solution.
Apart from your valid point of clearness of code which speaks for
renaming jstreams to Strigi everywhere, I do not see a problem. If you
can get Cyrille's namespace solution to work, I think it is ok to use
'Strigi' as a namespace everywhere in Strigi.
Cheers,
Jos
More information about the kde-core-devel
mailing list