KDE/kdevelop/languages/cpp

Andreas Pakulat apaku at gmx.de
Wed Oct 31 19:08:11 UTC 2007


On Mittwoch, 31. Oktober 2007, David Nolden wrote:
> On Wednesday 31 October 2007 17:37:06 Andreas Pakulat wrote:
> > b) make the constructors of DUChainPointer implicit again, Hamish
> > made them explicit and I don't really know why, but I didn't feel
> > like changing that as there might have been a reason for that...
>
> Maybe because that's a kind of design rule(see krazy)?

I doubt that, I'd expect Hamish to be knowledgeable enough to know that 
for such a shared-ptr class implicit conversion is actually wanted. 
Unless of course he wanted to turn all API's into using the shared-ptr 
and thus make it easier to find the places where changes are needed. 
Lets wait for his response.

> Personally I 
> don't really get the sense of that rule, except maybe for the
> transparency thing that Kris Wong mentioned some time ago on the
> list, but for me that doesn't apply for smart pointers.

The rule is to make every constructor that needs only 1 argument 
explicit, but only as long as the implicit construction is not wanted. 

Its the same for this rule as for any other rule for kde-libraries, 
apply it when it makes sense. For the special cases we have krazy: 
exclude. 

Andreas

-- 
Chicken Little only has to be right once.




More information about the KDevelop-devel mailing list