[Kde-pim] KCalCore Ptr typedefs and constness
Sérgio Martins
iamsergio at gmail.com
Mon Aug 23 16:38:48 BST 2010
On Sat, Aug 21, 2010 at 8:06 PM, Bertjan Broeksema <broeksema at kde.org>wrote:
> To make the *full* api
> const correct, you'd end up with numberous of overloads which imo results
> in
> an api that is hard to read and hairy to use/maintain.
>
>> Hairy to use
>From the callers POV, it's the same, he doesn't even notice there's an
overload.
>> Hairy to maintain
Getters are usually simple, and i think we don't have many getters returning
pointers.
>> Api hard to read.
Qt seems to use full const-correctness for getters that return non-widget
pointers and the api isn't hard to read :)
>From QImage:
uchar * bits ()
const uchar * bits () const
So, to conclude this thread, can we agree on:
Adding the ConstPtr typedef (and s/Ptr/ConstPtr in some places)
Adding overloads
?
Alvaro, if you're not subscribred to this ML, the thread starts here (
http://lists.kde.org/?l=kde-pim&m=128217840103573&w=2)
Regards,
Sérgio Martins
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list