Automatic color chooser

Andreas Pakulat apaku at gmx.de
Sun Aug 9 10:10:31 UTC 2009


On 09.08.09 11:59:37, David Nolden wrote:
> Am Sonntag 09 August 2009 10:26:28 schrieb Andreas Pakulat:
> > On 09.08.09 09:53:24, David Nolden wrote:
> > > Am Sonntag 09 August 2009 02:32:44 schrieb Ben Boeckel:
> > > > Hi,
> > > >
> > > > Would it be possible to make the code that determines colors for
> > > > variables in KDevelop to be put into a library? Other applications
> > > > that could use automatic color selection could use it (I'm
> > > > thinking Konversation right now). Thoughts?
> > >
> > > That thing is about 100 LOCs, so putting it into a library wold be
> > > complete overkill. It's more a case for copy+paste ;-)
> >
> > No, thats completely wrong. Even if its just 10 LoC's sharing has more
> > benefits than copy+paste. I suggest we find a place in kdelibs/kdeui for
> > this (or kutils).
> Creating a library for 100 LOCs is overkill, makes maintainment more 
> complicated rather than easier,

Thats wrong, any code thats shared via copy+paste is less matinainable then
code shared via a library or maybe just inline in a header file. Obviously
with copy+paste a fix/change in one copy will seldomly move over to all
other copies.

> and reduces flexibility to a minimum by introducing one more API layer in
> between.

Usually reduced flexibility shows that the API isn't used in enough places
and not mature enough. You can create a flexible API also in a shared
library.

Andreas

-- 
Chess tonight.




More information about the KDevelop-devel mailing list