A New Krazy Checker for Methods Returning const refs
Kevin Ottens
ervin at kde.org
Sun Apr 15 18:04:44 BST 2007
Le Dimanche 15 Avril 2007, Jos van den Oever a écrit :
> 2007/4/15, Thomas Zander <zander at kde.org>:
> > Which means that he was pointing at an internal member of my class for
> > the whole lifetime of his class.
> >
> > And thats just bad design. Its bound to crash weirdly sooner or later.
>
> Yes, that's bad design but not on the part of your class.
> If every class is forced to only give out threadsave implicitly shared
> objects, you might as well use java.
Actually that's wrong, you don't have implicitely shared objects in java. You
manipulate pointers all the time and it's far from being threadsafe if you
don't use them with extra care.
> It means that using any STL class
> is out of the question unless it is wrapped. That's a silly overhead.
Using STL in kdelibs public API looks like masochism anyway. :-)
Regards.
--
Kévin 'ervin' Ottens, http://ervin.ipsquad.net
"Ni le maître sans disciple, Ni le disciple sans maître,
Ne font reculer l'ignorance."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070415/3cbb53ba/attachment.sig>
More information about the kde-core-devel
mailing list