[RFC] Solid and use of namespaces

Marcos Mayorga marcos at mm-studios.org
Mon May 22 17:22:55 BST 2006

i've readed before something about a file full of prefixes like KIO.
namespaces was invented to classify types, if using only one level is a
requirement, i'd find it an artificial decission and maybe

namespaces let you enter in 'scopes' easily, so the readability is
supposed to be improved, and accesibility too.

by the way, what makes the difference in terms of readability between
power_battery and power::battery ?????

 mm I thing it is something quite subjetive, so here i am with my point of
view, no more.

thank you

> On Monday 22 May 2006 15:39, Marcos Mayorga wrote:
>> > Seems to me you're confusing namespaces and polymorphism.
>> i don't think so, because in my example i solar_panel doesn't inherit
>> from battery, just reside in the same namespace, ok, power::have_i...
>> function would use polymorphism to resolve which class to use, but my
>> point was that all of these classes resides inside power namespace.
> Then your only example of how it is better has nothing to do with
> namespaces and I already gave some examples (which David also agreed
> with) where readability is actually hampered. I.e. its not so black and
> white.
> Nobody is saying namespaces are evil; its all a matter of weighing the
> good and the bad.  And if you overuse namespaces (i.e have more then one
> namespace for any library) then the small amount of good points that
> namespaces bring will quickly be overshadowed by the readability,
> learnability and feeling of having an overdesigned API.
> --
> Thomas Zander

More information about the kde-core-devel mailing list