[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: [RFC] Solid and use of namespaces
From:       Thomas Zander <zander () kde ! org>
Date:       2006-05-22 14:15:16
Message-ID: 200605221615.16775.zander () kde ! org
[Download RAW message or body]


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

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic