Strokes framework naming problem

Boudewijn Rempt boud at valdyas.org
Mon Jul 11 10:51:59 CEST 2011


On Monday 11 July 2011 Jul, Dmitry Kazakov wrote:
> On Mon, Jul 11, 2011 at 8:22 AM, Silvio Heinrich <> wrote:
> 
> >
> > I personally think that all the calss naming in krita is a big mess and
> > that is because we are not using namespaces.

No, it's not because we're not using namespaces, it's because Krita has been developed for over ten years now by dozens of people, most of whom are not native speakers of English. That will cause a mess in naming no matter what.

> > I mean, seriously... that is what namespaces are for. To group classes
> > logically and prevent name clashes.
> >
> 
> I think it's a great idea! I didn't even think about it! =)
> 
> Well, the strokes do not use any moc-related stuff so they can be done this
> way.
> Like:
> 
> StrokeStrategy::UndoCommandBased
> StrokeStrategy::PainterBased
> StrokeStrategy::Freehand
> 
> StrokeJobStrategy::UndoCommandBased
> StrokeJobStrategy::PainterBased
> StrokeJobStrategy::Freehand
> 
> 
> Boud, Cyrille, why don't we use namespaces in Krita? Maybe, there is some
> reason other than moc for it?

Namespaces aren't any different from prefixes -- except that because you can declare a namespace used, the prefix isn't used everywhere. And I find that confusing. I prefer to see StrokeJobStrategyFreehand everywhere, instead of sometimes StrokeJobStrategy::Freehand and sometimes just Freehand.


-- 
Boudewijn Rempt
http://www.valdyas.org, http://www.krita.org, http://www.boudewijnrempt.nl


More information about the kimageshop mailing list