[Kstars-devel] SkyPoint/SkyObject refactoring

Akarsh Simha akarshsimha at gmail.com
Fri May 29 07:09:59 CEST 2009


> > I don't see why (from KStars' point of view) a SkyObject is not a
> > SkyPoint (with some dimensions and extra attributes). I wonder if it
> > is worth all the effort to tackle this. SkyObject is comfortably
> > extending SkyPoint, right?
> >
> SkyObject is not SkyPoint because it's impossible to replace S.O. with S.P. 
> unless all you need is coordinates. 

Hmm...

> > Moreover, the code will become much more complicated if a SkyObject
> > has a SkyPoint rather than inheriting from it. We will need to call
> > SkyObject::point()->ra() for instance, or reimplement a host of
> > functions. I don't think the change is worth the effort.
> >
> I could tell whether change will be for worse or better. This could be 
> determined only experimentally. So I'll try write patchset which implement 
> such change. It should be useful anyway since it will provide knowledge on how 
> should things be done. 

Okay.

> My main complaint about kstars design is that it's tight coupled and not 
> orthgonal. When I want to look at one thing I have to look at many.
> I don't know how this could be improved so I'm trying to do something and look 
> for result. 

That's true. I had trouble initially going through KStars' codebase,
but after some time, I now know where to look for things. Maybe we
should have an inheritance diagram somewhere, to help quickly find
bits of code that matter.

Regards
Akarsh


More information about the Kstars-devel mailing list